INNER CODE UNIT · Python
get_sandbox
deeplethe/forkd · sdk/mcp/sandstorm_mcp/server.py:307
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()
def kill_sandbox(sandbox_id: str) -> dict[str, Any]:
"""Delete one sandbox, on whichever tier it is."""
with _client() as c:
r = c.delete(f"/v1/sandboxes/{sandbox_id}")
r.raise_for_status()
return {"id": sandbox_id, "killed": True}
@mcp.tool()