INNER CODE UNIT · Python

delete_snapshot

deeplethe/forkd · sdk/mcp/sandstorm_mcp/server.py:141

def delete_snapshot(tag: str) -> dict[str, Any]:
    """Delete a snapshot tag. Refused with 409 while sandboxes are forked from it."""
    with _client() as c:
        r = c.delete(f"/v1/snapshots/{quote(tag, safe='')}")
        r.raise_for_status()
        return {"tag": tag, "deleted": True}


@mcp.tool()
def spawn_sandboxes(
    template: str | None = None,
    snapshot_tag: str | None = None,
    n: int = 1,
    memory_limit_mib: int | None = None,
    start_timeout_secs: float = 60,
) -> list[dict[str, Any]]:
    """Start N sandboxes from a template, or fork them from a snapshot tag.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…