Skip to main content
Glama

ck_execute_code

Run AI-generated code in an isolated Docker sandbox, validating source first, blocking network/filesystem/secrets, and supporting dry-run planning.

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
codeYesGenerated source code to validate and execute in the sandbox.
dry_runNoWhen true, validate and plan without executing the actual operation.
sandboxNoExecution sandbox. Local host execution is intentionally unsupported.
task_idNo
languageNoRuntime language. Defaults to javascript.
risk_tierNoSecurity sensitivity of the task. Default: medium.
session_idNoUnique session identifier for correlating findings, proofs, budget, and audit trail.
timeout_msNoTimeout in milliseconds.
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.
max_output_bytesNoMaximum size in bytes for captured output.
network_allowlistNo
requested_capabilitiesNo

Output Schema

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

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

Description adds value over annotations by detailing sandbox defaults, denial of capabilities, validation step, and dry_run support. No contradiction 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 efficiently conveys core purpose and key constraints without redundancy.

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 params, output schema exists), the description covers essential behavior. Could detail timeout/output handling but is sufficient with schema support.

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 3 is appropriate. Description mentions dry_run and sandbox but does not elaborate on other parameters beyond 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 clearly states the tool executes code in a non-local sandbox, specifying Docker as default, and lists restrictions. It distinguishes from siblings as no other tool performs 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 Guidelines4/5

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

The description explicitly states when to use (for code execution in a sandbox) and what it denies, but does not provide explicit alternatives or when-not-to-use scenarios.

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