Skip to main content
Glama

Compare Execution

compare_execution

Run the same code in multiple languages side by side and compare per-language output, exit code, duration, and performance.

Instructions

Run the same code in multiple languages side by side.

Returns per-language stdout/stderr/exit/duration plus which was fastest. Example: {"python3": "print(67)", "node": "console.log(67)"}

This tool fans out across every language with no per-language install plumbing behind it; use install_package/execute_code(dependencies=...) beforehand instead. A # /// script block in a snippet is likewise never installed, but is DISCLOSED, not dropped: a python3 row that carries one gets dependencies: {"status": "unsupported", "reason": ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stdinNoText piped to every snippet's standard input; empty means no input
timeoutNoWall-clock seconds allowed per language before that run is killed
snippetsYesLanguage name -> code; each snippet must be a complete, valid program in its own language
dependenciesNoNot supported here; any truthy value is refused — install packages beforehand instead

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.12.0
    • addedInput schema / properties / dependencies / description
      Added value: +"Not supported here; any truthy value is refused — install packages beforehand instead"
    • addedInput schema / properties / snippets / description
      Added value: +"Language name -> code; each snippet must be a complete, valid program in its own language"
    • addedInput schema / properties / stdin / description
      Added value: +"Text piped to every snippet's standard input; empty means no input"
    • addedInput schema / properties / timeout / description
      Added value: +"Wall-clock seconds allowed per language before that run is killed"
  2. Changed2 schema fields changedv0.11.0
    • addedInput schema / properties / dependencies
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Dependencies"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "compare_executionDictOutput",
      +  "type": "object"
      +}
  3. Changed6 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / snippets / title
      Added value: +"Snippets"
    • addedInput schema / properties / stdin / title
      Added value: +"Stdin"
    • addedInput schema / properties / timeout / title
      Added value: +"Timeout"
    • addedInput schema / title
      Added value: +"compare_executionArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  4. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only set readOnlyHint=false, openWorldHint=true, etc., without detailing specific behavior. The description goes far beyond annotations by disclosing that the tool 'fans out across every language' without install plumbing, that dependencies passed to this tool are refused (via schema) and that script blocks are disclosed but not installed. It also details the returned fields (stdout/stderr/exit/duration, fastest), adding meaningful behavioral transparency not inferable from annotations alone.

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 compact: two paragraphs with a clear example. The primary purpose is front-loaded, followed by crucial caveats about dependencies and script blocks. No redundant phrases; every sentence carries actionable information. The example is concise and illustrative.

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 tool's complexity (multi-language execution, nested snippets, dependency handling) and that it has an output schema (though not shown), the description covers all essential points: what it does, what it returns, how dependencies are treated, and an example. The agent has enough to invoke it correctly and interpret results. No significant gaps remain.

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 input schema has 100% coverage and already describes each parameter (stdin, timeout, snippets, dependencies). The description adds value by giving a concrete example of the snippets object and clarifying that each snippet must be a complete valid program. It also explains that dependencies are not supported and that script blocks yield a specific status. While the schema covers the basics, these additions sharpen understanding without contradicting the schema.

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 begins with a clear, specific statement of function: 'Run the same code in multiple languages side by side.' It further clarifies the output (stdout/stderr/exit/duration plus fastest) and gives an example. It distinguishes itself from siblings by explicitly referencing `install_package` and `execute_code(dependencies=...)`, making the tool's scope unmistakable.

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?

The description explicitly states when to use alternatives: 'use `install_package`/`execute_code(dependencies=...)` beforehand instead' for dependency installation. It also explains the behavior for `# /// script` blocks, advising that they are disclosed rather than installed. This provides clear, actionable context for when to choose this tool versus its siblings.

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