التوثيق

ctx_execute - Tool Reference

Run code in sandbox (11 languages). Only stdout enters context. Raw data never leaves subprocess. Languages: javascript, typescript, python, shell, ruby, go, ru

ctx_execute Workflow & Orchestration

Run code in sandbox (11 languages). Only stdout enters context. Raw data never leaves subprocess. Languages: javascript, typescript, python, shell, ruby, go, rust, php, perl, r, elixir.

Parameters
7
Required
2
Token Impact
Output is compressed like ctx_shell.

When to Use

Running code snippets in a sandboxed environment (11 languages). Safe execution without affecting the project.

When Not to Use

For shell commands (use ctx_shell) or when you need to modify project files (use ctx_edit).

Parameters

Parameter Type Required Description
action string No batch — execute multiple scripts. Provide items as JSON array [{language, code}]
code string Yes Code to execute in sandbox
intent string No What you want from the output (triggers intent-driven filtering for large results)
items string No JSON array of [{"language": "...", "code": "..."}] for batch execution
language string Yes Language: javascript|typescript|python|shell|ruby|go|rust|php|perl|r|elixir
path string No For action=file: process a file in sandbox (auto-detects language)
timeout integer No Timeout in seconds (default: 30)

Related Tools

Schema MD5: 193135d118da09d7f552ee677ee98c4f ← Back to all tools