Skip to main content
Glama

Verify Translation

verify_translation

Run both programs on the same test inputs and compare outputs to verify that a ported translation matches the original.

Instructions

PROVE that a port is equivalent: run both programs, compare their output.

You write the translation — you are the language model. This runs your source and your port on the same inputs and reports, per input, whether they matched, diverged, or could not be compared (a runtime that is missing or a program that failed on both sides is INCONCLUSIVE, never a pass).

Use it after porting anything: python3 -> go, node -> rust, a rewritten function against the original. Pair with compare_edge_cases to find the inputs worth testing.

Matching tolerates only line-ending/trailing-whitespace noise; stdout_raw carries what actually ran.

A pass is graded cross_checked (two independent implementations, run and agreeing — see grade_basis for which runtimes). A non-pass is graded ungraded: never a softer positive grade.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_codeYesOriginal program, in `source_language`
target_codeYesPorted program, in `target_language`, to check against `source_code`
test_inputsNoInputs to run both programs on and compare; omit to use the default edge-case set
source_languageYesLanguage of `source_code`
target_languageYesLanguage of `target_code`

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.12.0
    • addedInput schema / properties / source_code / description
      Added value: +"Original program, in `source_language`"
    • addedInput schema / properties / source_language / description
      Added value: +"Language of `source_code`"
    • addedInput schema / properties / target_code / description
      Added value: +"Ported program, in `target_language`, to check against `source_code`"
    • addedInput schema / properties / target_language / description
      Added value: +"Language of `target_code`"
    • addedInput schema / properties / test_inputs / description
      Added value: +"Inputs to run both programs on and compare; omit to use the default edge-case set"
  2. Changed1 schema field changedv0.11.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "verify_translationDictOutput",
      +  "type": "object"
      +}
  3. Addedv0.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (openWorldHint, no readOnlyHint), the description discloses real behavioral detail: it runs both programs, reports per input as matched/diverged/inconclusive, and clarifies that a missing runtime or failure on both sides is inconclusive. It defines output tolerance and grading semantics—concrete behavior the agent wouldn't otherwise know.

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?

Every sentence earns its place. The purpose is front-loaded in the first sentence, followed by a fundamental fairness that the agent writes the program, the execution model, when to use it, the tolerance rules, and grading. The all-caps emphasis on key terms is clean and helps scanning.

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?

An output schema exists so return values don't need to be explained. The description covers the critical usage context (when, what input to provide, how output behaves, how grading works, and a companion tool for edge cases). It does not explicitly mention potential side effects of executing user code, but the shape of the tree, the instructions, and the open flow, the behavior is surrounded by enough care.

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 descriptions already cover 100% of parameters. The description adds the meta note 'You write the translation — you are the language model', which clarifies the agent's responsibility for generating the target code but provides no extra semantic detail about the parameter format or ranges. This is the baseline for high schema-coverage tools.

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 'PROVE that a port is equivalent: run both programs, compare output' which is a specific verb and resource, and it emphasizes the translation scenario. It also gives concrete example pairs (python->go, node->rust), making the purpose unambiguous against other verification tools.

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?

Explicitly says 'Use it after porting anything' and suggests pairing with compare_edge_cases for input selection. It clearly specifies the intended use-case, but it does not name the sibling 'verify_optimization' as an exclusion, leaving the differentiation between these two verify tools implicit.

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