Skip to main content
Glama

Run code

run_code

Run code the way the Run button of a code block does, to check it: "sql", "mongodb", "redis" and "clickhouse" run in your own database of the presentation (made from its database scripts; what you change stays in it), "python" and "bash" in a sandbox without network that keeps nothing. The presentation itself does not change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code (at most 20000 characters).
langYesLanguage of the code.
slugYesThe presentation's slug (its address: /movie/<slug>/).
resetNosql, mongodb, redis, clickhouse: first make your database again from the script of the presentation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
langYes
stderrNo
stdoutNo
noticesNo
omittedNo
resultsNo
exit_codeNo
sql_errorNo
timed_outNo
elapsed_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / lang / enum
      Previous value: -[
      -  "sql",
      -  "mongodb",
      -  "redis",
      -  "python",
      -  "bash"
      -]New value: +[
      +  "sql",
      +  "mongodb",
      +  "redis",
      +  "clickhouse",
      +  "python",
      +  "bash"
      +]
    • changedInput schema / properties / reset / description
      Previous value: -"sql, mongodb, redis: first make your database again from the script of the presentation."New value: +"sql, mongodb, redis, clickhouse: first make your database again from the script of the presentation."
    • changedOutput schema / description
      Previous value: -"sql / mongodb / redis: \"results\" (tables, counts or messages), \"notices\" and \"sql_error\"; python / bash: \"stdout\", \"stderr\", \"exit_code\" and \"timed_out\"."New value: +"sql / mongodb / redis / clickhouse: \"results\" (tables, counts or messages), \"notices\" and \"sql_error\"; python / bash: \"stdout\", \"stderr\", \"exit_code\" and \"timed_out\"."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only give generic hints (readOnlyHint=false, idempotentHint=false); the description adds the crucial side-effect model: sql/mongodb/redis/clickhouse mutate a persistent presentation-scoped database ('what you change stays in it'), while python/bash run sandboxed with no network and no retention. It also explicitly reassures the presentation itself is untouched, which is high-value context beyond the structured fields.

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?

Densely packed and front-loaded with the purpose, and nearly every clause carries information (language groups, persistence, sandbox, presentation safety). It is a single run-on sentence that would be easier to parse if split, which keeps it from a 5.

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?

An output schema exists so return values need not be described, and annotations plus the description together cover the safety and side-effect profile. For a code-execution tool the agent has everything needed: what runs, where it runs, what persists, and what is left untouched.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it partitions the lang enum into two groups with distinct execution and persistence semantics that the schema's bare 'Language of the code.' does not convey. The reset parameter's effect is only covered by the schema, not the description, keeping it from a 5.

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 code the way the Run button of a code block does') and immediately scopes the intent ('to check it'). No sibling tool executes code, and the description makes that distinct role obvious without opening the schema.

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 stated purpose ('to check it') clearly frames the use case for verification, and the language groups imply when each mode is appropriate. It offers no explicit when-not or named alternatives, but the tool is unique enough among siblings that this is a minor gap.

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.

Resources