Skip to main content
Glama

Run code in a Cinch sandbox

execute_code

Execute Python or JavaScript in a secure, isolated sandbox to test code, verify calculations, or transform data, and receive stdout/stderr output.

Instructions

Execute Python or JavaScript in a secure, isolated, disposable sandbox and return its output. The sandbox is a gVisor-isolated container on Cinch's infrastructure with no access to the user's machine, filesystem, or network, so it is safe to run code you generated yourself, code from an untrusted source, or code whose behaviour you are unsure about. Use it whenever running code gives a more reliable answer than reasoning about it: checking a script works, exact calculations, parsing or transforming data, testing a regex, verifying language behaviour.

The environment is deliberately minimal. Read these limits before writing code:

  • Python 3.12 and Node 20, STANDARD LIBRARY ONLY. No third-party packages are installed and none can be installed. numpy, pandas, requests, scipy, axios, lodash and everything else on PyPI or npm are unavailable. Use json, csv, re, math, statistics, itertools, collections, datetime, hashlib, decimal, fractions and the rest of the stdlib instead.

  • NO network access. HTTP requests, DNS, package installs and API calls all fail.

  • NO filesystem persistence. The root filesystem is read-only; only /tmp is writable, and it is destroyed when the run ends.

  • 10 second execution limit, 256 MB memory, 0.5 CPU.

  • Every call gets a brand new sandbox. Nothing persists between calls — no variables, no files, no imports. Each snippet must be complete and self-contained.

  • Only stdout and stderr are returned. Print anything you want to see; a bare expression on the last line returns nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesA complete, self-contained program using only the standard library. Must print results to stdout.
languageNoRuntime to execute the code in. Python 3.12 or Node 20.python
Behavior5/5

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

The description goes far beyond the annotations by detailing the gVisor isolation, read-only filesystem except /tmp, 10-second execution limit, 256 MB memory, 0.5 CPU, lack of network access, disposable fresh sandbox per call, and that only stdout/stderr are returned. It also clarifies that nothing persists between calls. This discloses behavioral traits and constraints comprehensively, and it does not contradict the 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?

The description is well-structured with a clear opening sentence, a use-case rationale, and a 'Read these limits' bulleted list. The length is appropriate for the tool's complexity — every sentence carries essential information about safety, constraints, or output behavior. It is front-loaded with purpose and usage, making it easy to scan.

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

Completeness5/5

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

Given the sandbox's complexity and the absence of an output schema, the description thoroughly covers the environment, resource limits, persistence semantics, return values (stdout/stderr only), and security model. It provides enough context for an agent to use the tool correctly and anticipate failures such as no network or missing packages. No critical operational detail appears omitted.

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

Parameters4/5

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

The schema already provides 100% coverage of both parameters, including descriptions for `code` (self-contained, must print to stdout) and `language` (enum, default, runtime versions). The description adds meaningful guidance beyond the schema, such as explicitly noting that a bare expression returns nothing, listing available stdlib modules, and emphasizing self-containedness. These additions help the agent construct valid code, though some repetition of schema text exists.

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 opens with a precise statement: 'Execute Python or JavaScript in a secure, isolated, disposable sandbox and return its output.' This gives a specific verb, resource, and environment, making the tool's core purpose immediately clear. Since there are no sibling tools, the description doesn't need to differentiate, but it still does by emphasizing isolation/disposability.

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 guides usage: 'Use it whenever running code gives a more reliable answer than reasoning about it' with concrete examples like checking scripts, exact calculations, and testing regex. It also communicates when not to use it through constraints such as no network, no third-party packages, and no persistence, though it does not name alternative tools.

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/yusufkadry/cinch-mcp'

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