dev.code.execute
⚡ ACTION: Execute source code in a sandboxed environment — 71 programming languages supported (Python, JavaScript, Java, C++, Go, Rust, C#, Bash, Ruby, PHP, and 60+ more). Returns stdout, stderr, execution time, and memory usage. Safe sandboxed execution with CPU/memory limits. Use code.languages...
This record as markdown: /tools/io-github-whiteknightonhorse-apibase/dev.code.execute.md
What dev.code.execute does on Apibase
AI agents invoke dev.code.execute to trigger actions in Apibase. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
stdin | string | — | Standard input to feed to the program |
language_id | integer | Yes | Language ID from code.languages (e.g. 71=Python 3, 63=JavaScript, 62=Java, 54=C++, 60=Go, 73=Rust, 51=C#, 46=Bash). Call code.languages for full list |
source_code | string | Yes | Source code to execute |
memory_limit | number | — | Memory limit in KB (default 128000 = 128MB) |
cpu_time_limit | number | — | CPU time limit in seconds (default 5, max 15) |
Parameters from the server's own tool schema.
Why dev.code.execute is rated High
Executes arbitrary code in 71 languages; blast radius depends on code arguments and sandbox escape risks.
From the tool's definition Execute source code in sandboxed environment, 71 programming languages supported, returns stdout/stderr
Attacks that exploit this kind of access
The rule that runs dev.code.execute safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Apibase, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For dev.code.execute, this is the rule to start with:
dev.code.execute stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Apibase, apply this rule, and every dev.code.execute call is checked against it from then on.
Questions about dev.code.execute
⚡ ACTION: Execute source code in a sandboxed environment — 71 programming languages supported (Python, JavaScript, Java, C++, Go, Rust, C#, Bash, Ruby, PHP, and 60+ more). Returns stdout, stderr, execution time, and memory usage. Safe sandboxed execution with CPU/memory limits. Use code.languages to get language IDs (Judge0 CE). It is categorised as a Execute tool in the Apibase MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
dev.code.execute accepts 5 parameters: stdin, language_id, source_code, memory_limit, cpu_time_limit. Required: language_id, source_code. The full parameter table on this page comes from the server's own tool schema.
Register the Apibase MCP server in PolicyLayer and add a rule for dev.code.execute: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Apibase. Nothing to install.
dev.code.execute is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the dev.code.execute rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for dev.code.execute. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
dev.code.execute is provided by the Apibase MCP server (apibase-mcp-client). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Apibase, and thousands of servers like it.
Across the catalogue