Skip to main content
Glama

ck_execute_code

Validate and execute generated code inside a restricted Docker sandbox. Use dry_run to plan execution without running code.

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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
allowedNo
commandNo
dry_runNo
exit_statusNo
languageNo
outputNo
output_truncatedNo
policyNo
proof_artifactsNo
sandboxNo
validationNo
Behavior5/5

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

Annotations only indicate non-read-only and non-destructive. The description adds critical behavioral details: sandbox execution, default Docker, denied capabilities, validation, and dry_run planning. No contradictions with annotations.

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

Conciseness5/5

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

Single sentence delivers all key points (execution context, defaults, restrictions, validation, dry_run) without redundancy or excess.

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

Completeness4/5

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

Given the complexity (12 parameters, output schema present), the description covers behavioral essence and security posture. It does not detail return values, but the output schema likely covers that.

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 description coverage is high (75%). The description indirectly explains related parameters (e.g., 'denies network/filesystem/secrets/shell/deploy' maps to 'requested_capabilities'), but does not add per-parameter details beyond the schema.

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 uses a specific verb ('Execute') and resource ('generated code'), clearly stating the action and context. It distinguishes from siblings by emphasizing 'non-local sandbox' and restrictive defaults, which no other sibling tool suggests.

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

Usage Guidelines4/5

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

It explicitly states defaults, denied capabilities, validation step, and dry_run support, giving clear context for when to invoke. While it doesn't enumerate alternatives, the restrictions effectively guide appropriate usage.

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