Skip to main content
Glama

ck_execute_code

Execute generated code inside a Docker sandbox with network and system access restricted. Validate source code and plan execution using dry-run mode.

Instructions

Execute generated code only inside a configured non-local sandbox. Defaults to Docker, denies network/filesystem/secrets/shell/deploy, validates source first, and supports dry_run for planning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allowed_env_varsNoList of environment variable names to expose from the host environment into the sandbox. Explicit env vars take precedence over host env vars. If empty, no host environment variables are exposed.
codeYesGenerated source code to validate and execute in the sandbox.
dry_runNoWhen true, validate and plan without executing the actual operation.
languageNoRuntime language. Defaults to javascript.
max_output_bytesNoMaximum size in bytes for captured output.
network_allowlistNo
requested_capabilitiesNo
risk_tierNoSecurity sensitivity of the task. Default: medium.
sandboxNoExecution sandbox. Local host execution is intentionally unsupported.
session_idNoUnique session identifier for correlating findings, proofs, budget, and audit trail.
task_idNo
timeout_msNoTimeout in milliseconds.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries full disclosure burden. It reveals the tool defaults to Docker, denies network/filesystem/secrets/shell/deploy capabilities, validates source first, and supports dry_run planning. This covers key safety and operational behaviors, though it omits error handling and concurrency details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently conveys multiple key points: sandbox requirement, default, denied capabilities, validation, and dry_run support. No fluff, but it could be split into two sentences for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 12 parameters and no output schema, the description provides a high-level summary but lacks details on return values, error handling, or how to configure parameters like network_allowlist or requested_capabilities. Additional guidance would improve completeness for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so baseline is 3. The description adds context about dry_run and denied capabilities, which maps to some parameters, but does not detail each parameter's semantics beyond what the schema provides. It neither significantly adds nor detracts from schema info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes generated code inside a configured non-local sandbox, specifying defaults (Docker), denied capabilities, and support for dry_run. It is distinct from all sibling tools, none of which are code execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions it is for generated code and runs only in a non-local sandbox, denying certain capabilities. However, it does not explicitly state when to use this tool versus alternatives or provide when-not-to-use guidance. Since no other execution tool exists, ambiguity is reduced but not fully addressed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aryaminus/controlkeel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server