execute
Run Python code in a persistent shared namespace with access to structures, calculators, and job IDs. Captures stdout for trusted local development.
Instructions
Execute Python in the persistent session namespace (escape hatch).
The namespace is shared with all tools: structures, calculators and jobs are bound by id (struct_1, calc_1, job_1) plus aliases (atoms, calc, job). Trusted local-dev use only. Captured stdout is returned.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |