Skip to main content
Glama

tenki_run_code

Run shell, Python, or JavaScript snippets in a throwaway microVM and return stdout, stderr, and exit code before destroying the sandbox.

Instructions

Boot a throwaway microVM, run a snippet (shell/python/javascript), return its stdout/stderr/exit code, and tear the sandbox down. Cost-guarded and self-terminating. Use this for one-shot execution when you don't need a persistent sandbox. Output over ~64KB per stream is truncated head+tail — and the sandbox is gone, so for large output use tenki_create_sandbox + tenki_exec and page through the retained file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoEnvironment variables as a key→value object.
codeYesThe code to run.
languageYesInterpreter for the snippet.
timeout_secondsNoMax seconds for the run (default 30).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare non-read-only, non-idempotent, non-destructive, open-world. The description adds genuinely new behavioral context: cost-guard, self-termination, sandbox teardown, per-stream head+tail truncation over ~64KB, and the fact that the sandbox is unrecoverable afterward. 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?

Four sentences, each earning its place: core lifecycle, cost/safety note, usage guidance with alternative, and the truncation caveat. The most important action verb is front-loaded, and there is no filler or repetition of schema content.

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?

With no output schema, the description covers the return values (stdout/stderr/exit code), the key behavioral limits (truncation, self-termination), and the routing to a persistent alternative for large outputs. For a one-shot execution tool with a 100%-covered schema, nothing an agent needs to call and interpret it 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 description coverage is 100%, so all four parameters are already documented in the schema. The description merely echoes the allowed languages ('shell/python/javascript') and the default timeout without adding meaning beyond what the schema's property descriptions already provide. Baseline 3 is appropriate.

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 names a specific verb+resource: boot a throwaway microVM, run a snippet, return stdout/stderr/exit code, and tear it down. It also explicitly distinguishes itself from the persistent sandbox flow (tenki_create_sandbox + tenki_exec), so an agent can tell it apart from siblings without opening schemas.

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 states exactly when to use this tool ('one-shot execution when you don't need a persistent sandbox') and when not to ('for large output use tenki_create_sandbox + tenki_exec and page through the retained file'). The alternative is named explicitly with the condition that selects it.

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

Deploy Server

Other Tools