Sandboxes (extension)

use_sandbox

Select which launched sandbox execute_code should use instead of kernels.

Select which launched sandbox execute_code should use instead of kernels.

destructive: yes

Parameters

ParameterTypeRequiredDefaultDescription
sandbox_namestring | nullnonullSandbox name to activate for execute_code. Pass null/empty to disable sandbox routing and return to Jupyter kernels.

Output

{
  "properties": {
    "result": {
      "description": "Sandbox routing status",
      "title": "Result",
      "type": "string"
    }
  },
  "required": [
    "result"
  ],
  "title": "use_sandboxOutput",
  "type": "object"
}

Call it

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "use_sandbox",
    "arguments": {
      "sandbox_name": null
    }
  }
}
result = await session.call_tool("use_sandbox", arguments={"sandbox_name": None})

Source

Registered by the @mcp.tool decorator on use_sandbox in ext/sandboxes/jupyter_mcp_sandboxes/extension.py.