Skip to main content

Module ctx_execute

Module ctx_execute 

Source

Functionsยง

handle
Executes a code snippet in a sandboxed environment. Returns the formatted output plus the structured outcome so the MCP layer can set isError/structuredContent on failures (GitHub #389).
handle_batch
Executes multiple (language, code) pairs in parallel and returns aggregated results. The outcome carries the first non-zero exit code (0 when all tasks succeeded), so one failing task marks the whole batch as failed.
handle_file
Summarize admitted file content as data, without executing it or creating a plaintext temporary copy. Source rules run before statistics or previews.
handle_in
Same as handle, but runs the snippet in cwd (GH #1666).