Skip to main content
Glama

agent-exec

Run code (paid, x402)

execute

PAID: run Python or JavaScript code (python3, node) in an isolated, network-less sandbox; returns stdout, stderr and exit code. Price scales with limits. Unpaid, it returns the price; pay with x402 (USDC on Base, Solana, Polygon, Arbitrum, Avalanche, Sei or X Layer) in _meta['x402/payment'] and call again. Feedback: POST /feedback (free). Read daily; no individual reply.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "runtime": "<runtime>",
      "source": "<source>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoOptional extra files, as POST /execute takes them.
stdinNoOptional standard input.
limitsNoOptional limits (timeoutMs, memoryMb, ...); they set the price.
sourceYesThe program to run.
runtimeYesOne of python3, node.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare the readOnly/openWorld/destructive flags, so the description carries the real burden and does it well: network isolation, price scaling with limits, the two-phase unpaid-then-paid protocol, and accepted chains. It omits failure modes (timeouts, non-zero exit handling) and rate limits, keeping it short of a 5.

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?

Dense but front-loaded: capability and sandbox first, then price, then payment mechanics. The trailing feedback/read-daily note is marginally relevant boilerplate but brief enough not to distract.

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?

Covers purpose, sandbox properties, output fields and the paid-call protocol for a 5-parameter tool with nested objects and no output schema. Minor gaps remain around limit defaults and error/timeout behavior, but nothing essential to invoking it correctly is missing.

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 100%, so runtime, source, files, stdin and limits are already documented. The description adds one useful semantic link ('price scales with limits') but nothing about the shape of limits or files beyond what the schema says; baseline 3 applies.

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?

States a specific verb and resource ('run Python or JavaScript code (python3, node)') plus the execution context ('isolated, network-less sandbox') and the return shape (stdout, stderr, exit code). An agent knows exactly what this does and can distinguish it from unrelated siblings like scrape_page or infer_chat.

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 payment flow is spelled out step by step: an unpaid call returns the price, payment goes in _meta['x402/payment'], then call again. That is clear operational guidance, though there is no explicit when-not-to-use or comparison to alternative tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.