Add a "code mode" tool to an existing MCP server so LLMs can write small processing scripts that run against large API responses in a sandboxed runtime — only the script's compact output enters the LLM context window. Use this skill whenever someone wants to add code mode, context reduction, script execution, sandbox execution, or LLM-generated-code processing to an MCP server. Also trigger when users mention reducing token usage, shrinking API responses, running user-provided code safely, or adding a code execution tool to their MCP server — in any language (TypeScript, Python, Go, Rust, etc.).
89
85%
Does it follow best practices?
Impact
95%
2.20xAverage score across 3 eval scenarios
Advisory
Suggest reviewing before use
TypeScript sandbox executor
quickjs-emscripten selected
0%
100%
DATA injected as string
0%
100%
DATA variable name
0%
100%
stdout capture via console.log
50%
100%
Handle disposal
0%
100%
Timeout enforced
100%
100%
Error messages returned
100%
100%
Size measurement line
0%
100%
Tool parameter: code
0%
100%
Tool parameter: language optional
0%
0%
Executor is single file
100%
100%
Tool is single file
100%
100%
Python sandbox executor
Python-appropriate sandbox
0%
100%
compile_restricted used
0%
100%
safe_globals base
0%
100%
DATA injected as string
0%
100%
DATA variable name
0%
100%
print() allowed
0%
100%
Timeout enforced
100%
100%
Error messages returned
100%
100%
Size measurement line
0%
100%
Tool parameter: code
0%
100%
Executor is single file
100%
100%
Tool is single file
100%
100%
Benchmark context reduction
Before measurement: byte length
100%
100%
After measurement: output byte length
100%
100%
Reduction formula
100%
100%
Table headers match spec
0%
33%
Total row present
100%
100%
Mock data used
100%
100%
Multiple scenario patterns
100%
100%
goja sandbox used
0%
100%
DATA injected as string in Go
0%
100%
benchmark_output.txt present
100%
100%
3a2240a
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.