Home / Servers / DigitalOcean API / harness_post_session_sandbox_exec

ExecInSandbox runs a one-shot command inside the session's sandbox.

An MCP tool from the DigitalOcean API server, hosted on mcp.hjlabs.in.

ExecInSandbox runs a one-shot command inside the session's sandbox. Runs argv directly in the guest (no shell). Stdout/stderr are buffered and capped at 1 MiB each; truncation is indicated via response headers when present. A non-zero exit code is still HTTP 200. [POST /v2/agents/sessions/{session_id}/sandbox/exec]

Name on the gateway: digitalocean_api__harness_post_session_sandbox_exec · may change things.

Parameters

NameTypeDescription
session_id requiredstringThe session UUID.
argv requiredarrayProgram and arguments. Required and non-empty; run directly, with no shell…
workdirstringWorking directory inside the sandbox. Empty uses the sandbox default…
stdinstringOptional base64 stdin payload, delivered in full and then closed so the…
timeout_secondsintegerOptional timeout. Clamped server-side (default 60, maximum 240) regardless of…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "digitalocean_api__harness_post_session_sandbox_exec",
  "arguments": {
    "session_id": "…",
    "argv": []
  }
}

Or connect the DigitalOcean API server directly, which lists 874 tools including this one:

Run in your terminal
claude mcp add --transport http hj-digitalocean-api https://mcp.hjlabs.in/mcp/digitalocean-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the execinsandbox runs a one-shot command inside the session's sandbox. tool with session_id set to ….

More from DigitalOcean API