INNER CODE UNIT · Python
list_sandboxes
deeplethe/forkd · sdk/mcp/sandstorm_mcp/server.py:298
def list_sandboxes() -> list[dict[str, Any]]:
"""List every sandbox, on whichever tier it is. Tokens are not included."""
with _client() as c:
r = c.get("/v1/sandboxes")
r.raise_for_status()
return r.json()
@mcp.tool()
def get_sandbox(sandbox_id: str) -> dict[str, Any]:
"""Fetch metadata about one sandbox by id. Its token is not included."""
with _client() as c:
r = c.get(f"/v1/sandboxes/{sandbox_id}")
r.raise_for_status()
return r.json()
@mcp.tool()