INNER CODE UNIT · Python

list_templates

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

def list_templates() -> list[str]:
    """List the registered templates, which spawn_sandboxes can start from."""
    with _client() as c:
        r = c.get("/v1/templates")
        r.raise_for_status()
        return r.json()


@mcp.tool()
def list_snapshots() -> list[dict[str, Any]]:
    """List snapshot tags, which spawn_sandboxes can fork from.

    A tag is a checkpoint made by branch_sandbox, so a new deployment has
    none. Returns Snapshot objects: tag, node_id, template, from_sandbox,
    dir, size_bytes, created_at.
    """
    with _client() as c:
        r = c.get("/v1/snapshots")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…