Skip to main content
Glama

ck_execute_code

Run generated code in a configured Docker sandbox, validating source first, with dry-run planning and restricted network, filesystem, and secrets access.

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.3.81
  2. Removedv0.3.73
  3. Changed16 schema fields changedv0.3.55
    • addedOutput schema / properties / allowed
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / command
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / dry_run
      Added value: +{
      +  "type": "boolean"
      +}
    • removedOutput schema / properties / error
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / properties / exit_status / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedOutput schema / properties / language
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / output_truncated
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / policy
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / proof_artifacts
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sandbox
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / stderr
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / stdout
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / timed_out
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / valid
      Removed value: -{
      -  "type": "boolean"
      -}
    • addedOutput schema / properties / validation
      Added value: +{
      +  "type": "object"
      +}
    • removedOutput schema / properties / validation_errors
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
  4. Changed1 schema field changedv0.3.38
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "error": {
      +      "type": "string"
      +    },
      +    "exit_status": {
      +      "type": "integer"
      +    },
      +    "output": {
      +      "type": "string"
      +    },
      +    "stderr": {
      +      "type": "string"
      +    },
      +    "stdout": {
      +      "type": "string"
      +    },
      +    "timed_out": {
      +      "type": "boolean"
      +    },
      +    "valid": {
      +      "type": "boolean"
      +    },
      +    "validation_errors": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Addedv0.3.27
  6. Removedv0.3.25
  7. Changed7 schema fields changedv0.3.17
    • addedInput schema / properties / allowed_env_vars / items / description
      Added value: +"Host environment variable names to expose inside the sandbox."
    • addedInput schema / properties / dry_run / description
      Added value: +"When true, validate and plan without executing the actual operation."
    • addedInput schema / properties / max_output_bytes / description
      Added value: +"Maximum size in bytes for captured output."
    • addedInput schema / properties / network_allowlist / items / description
      Added value: +"List of hostnames or URLs the sandbox is permitted to access."
    • addedInput schema / properties / risk_tier / description
      Added value: +"Security sensitivity of the task. Default: medium."
    • addedInput schema / properties / session_id / description
      Added value: +"Unique session identifier for correlating findings, proofs, budget, and audit trail."
    • addedInput schema / properties / timeout_ms / description
      Added value: +"Timeout in milliseconds."
  8. First observedv0.1.0

TDQS

A4.2/5.0
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.

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