Skip to main content
Glama

run_submit

Submit code for background execution and receive a run ID immediately. Poll the run to check results or cancel it, keeping your current call free.

Instructions

Submit code for BACKGROUND execution; returns a run_id immediately.

Same request shape as execute_code (minus session_id: a run is a standalone process, not a session workspace). The work proceeds on a background worker; poll it with run_inspect(run_id) and, if needed, stop it early with run_cancel(run_id).

Use this instead of execute_code when you would rather not hold an MCP call open for the whole computation. timeout is still the WORK's own deadline (same 120s ceiling as execute_code) — it bounds the run, not how long you wait to collect it.

Admission is capped (CODECALC_MAX_ACTIVE_RUNS, default 64): past that many runs still running/cancelling at once, this returns a resource_exhausted error rather than growing without bound — call run_inspect/run_cancel to make room, or wait for one to finish.

Retention: see run_inspect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
stdinNo
no_netNo
max_cpuNo
timeoutNo
languageYes
providerNo
max_memory_mbNo
max_output_kbNo
Behavior5/5

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

No annotations exist, so the description carries the full transparency burden. It discloses background execution, immediate run_id return, standalone process behavior, timeout semantics, the run cap, and the resource_exhausted error path. Even retention is explicitly referenced. This goes beyond surface-level behavior.

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 clear and well-organized: it states the core behavior, contrasts with its alternative, explains the timeout contract, and briefly covers admission control and retention. Every sentence contributes meaningful information without 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 no annotations and no output schema, the description covers the key lifecycle and error behavior very well. It is slightly incomplete for fully understanding resource-limit parameters, and it defers some semantics to execute_code's shape rather than stating them directly, but overall it is sufficiently actionable for an agent.

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?

The input schema gives no parameter descriptions (0% coverage), so this description must supply meaning. It helpfully explains timeout semantics and says the request shape matches execute_code minus session_id. However, individual parameters like no_net, max_cpu, provider, and max_memory_mb are not directly described, making the description only moderately informative for many parameters.

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 specific verb and resource: 'Submit code for BACKGROUND execution; returns a run_id immediately.' It clearly distinguishes this from execute_code by highlighting background vs. synchronous execution and the standalone-process nature of a run.

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

Usage Guidelines5/5

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

It explicitly says 'Use this instead of execute_code when you would rather not hold an MCP call open for the whole computation.' It also tells the agent to poll with run_inspect(run_id) and cancel with run_cancel(run_id), covering both selection and follow-up effectively.

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/The-40-Thieves/codecalc'

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