On this page
Reference
ctx_execute
Input contract and parameters for ctx_execute.
MCP tool · Planning tools
Call this tool through your MCP client. Its availability depends on your active configuration and profile.
This registry contract is separate from the SDK. For terminal commands, use the CLI reference.
Parameters
Generated from the registered input schema. “Required” reflects the schema; individual actions can impose additional requirements.
actionstringcode (default, run script) | batch (parallel) | file (project file)
codestringSource code for action=code. Set intent to filter large output.
intentstringFocus intent; triggers filtering when output is large.
itemsstringJSON array of [{language, code}] for batch action.
languagestringjavascript|typescript|python|shell|ruby|go|rust|php|perl|r|elixir (for action=code)
pathstringFile path for action=file (language auto-detected).
timeoutintegerTimeout in seconds (default: 30)
Exact JSON schema
Inspect the complete input schema
{
"properties": {
"action": {
"description": "code (default, run script) | batch (parallel) | file (project file)",
"type": "string"
},
"code": {
"description": "Source code for action=code. Set intent to filter large output.",
"type": "string"
},
"intent": {
"description": "Focus intent; triggers filtering when output is large.",
"type": "string"
},
"items": {
"description": "JSON array of [{language, code}] for batch action.",
"type": "string"
},
"language": {
"description": "javascript|typescript|python|shell|ruby|go|rust|php|perl|r|elixir (for action=code)",
"type": "string"
},
"path": {
"description": "File path for action=file (language auto-detected).",
"type": "string"
},
"timeout": {
"description": "Timeout in seconds (default: 30)",
"type": "integer"
}
},
"required": [],
"type": "object"
}Runtime description
The following is the tool's own agent-facing description, reproduced from the reviewed registry. It can contain implementation terminology; it does not expand the public stability commitment.
Read the agent-facing description
Run code in sandbox (11 languages) — use when conditionals, multi-line or cross-language transforms.
ANTIPATTERN: for simple one-liners, prefer ctx_shell (lower overhead, auto-compressed).
language=shell supports multi-line scripts but shares ctx_shell's security policy.
action=code (default) for one-shot; action=batch for parallel multi-language;
action=file to process a project file (extension auto-detects).
Pass intent to focus large output and save tokens. Languages: javascript,
typescript, python, shell, ruby, go, rust, php, perl, r, elixir.Sources & versions
- mcp_manifest.rsrust/src/core/mcp_manifest.rsReviewed checkout
- registry.rsrust/src/server/registry.rsReviewed checkout
- dynamic_tools.rsrust/src/server/dynamic_tools.rsReviewed checkout
- Core checkout
50fbff09c9- Installed runtime
- 3.10.2
- SDK release
- 1.1.0
Separate baselines for source, CLI/configuration and SDK contracts. Review does not certify every platform or integration.
Versions & compatibility