execute_python
Run Python code on the host system with optional session management for stateful execution. Enables direct scripting, testing, and automation through the MCP server.
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>"
},
"name": "execute_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| session | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |