Execute Code
execute_codeRun restricted Python code in a sandbox, pass structured inputs, and retrieve results via MCP call_tool without host filesystem or network access.
Instructions
Run restricted Python with inputs, result, and await call_tool("server.function", args).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"description": "<description>"
},
"name": "execute_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python program assigning result; no host filesystem or network access. | |
| inputs | No | Structured dynamic values available as inputs inside the VM. | |
| description | Yes | Generic reusable operation description, without input values. | |
| input_schema | No | Optional JSON Schema constraining inputs for execution and reuse. | |
| idempotency_key | No | Optional owner-scoped deduplication key, not write approval. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||