Skip to main content
Glama

Affine Earth Math Court Remote

code_ir_equiv

The Code Court's first move: are two implementations equivalent by the exact value multiset of their LLVM IR constants? THE PAYLOAD IS TEXTUAL LLVM IR, NOT SOURCE: submit two .ll files (left_file and right_file, each {path, content}, or files as an array of two) produced by clang -S -emit-llvm, swiftc -emit-ir or rustc --emit=llvm-ir. What is graded: the constant pool of each side - every exact scalar operand (integers, and doubles lifted exactly at 64 bits), including vector constants, phi incoming values and operands behind attributes - digested as a multiset and compared. WIN when the two multisets are identical (constant-pool digests equal); CODE_IR_DIVERGED naming the first value one side has and the other does not (e.g. 'left has 7/1x1 not matched on right'); NOT_KNOWN when nothing mineable was found; a REFUSED_* refusal when a side is not IR (no define, declare, target or %name = / @name = line). Two-line .ll example from the MCP guide - left: 'define i32 @f(i32 %x) { %r = mul i32 %x, 3 ret i32 %r }' (one line per instruction) and right the same with 'mul i32 %x, 4' -> CODE_IR_DIVERGED; identical constants -> WIN. Stateless and content-addressed - the same two files rule identically on every cell. Compares the constant pool (a necessary, strong condition for numeric kernels), not full behavioural equivalence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoExactly two whole files when left_file/right_file are not used. The payload IS the files. e.g. [{"path":"left.ll","content":"define i32 @f() { ret i32 143 }"},{"path":"right.ll","content":"define i32 @f() { ret i32 143 }"}]
left_irNoLEGACY fragment of the first implementation. Still accepted and lifted into a whole file with a defaulted path; prefer left_file. e.g. define i32 @f() { ret i32 143 }
right_irNoLEGACY fragment of the second implementation. Still accepted and lifted into a whole file with a defaulted path; prefer right_file. e.g. define i32 @f() { ret i32 143 }
left_fileNoWhole source file of the first implementation. The payload IS the file. e.g. {"path":"left.ll","content":"define i32 @f() { ret i32 143 }"}
right_fileNoWhole source file of the second implementation. The payload IS the file. e.g. {"path":"right.ll","content":"define i32 @f() { ret i32 143 }"}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / files / description
      Previous value: -"Exactly two whole files when left_file/right_file are not used. The payload IS the files."New value: +"Exactly two whole files when left_file/right_file are not used. The payload IS the files. e.g. [{\"path\":\"left.ll\",\"content\":\"define i32 @f() { ret i32 143 }\"},{\"path\":\"right.ll\",\"content\":\"define i32 @f() { ret i32 143 }\"}]"
    • addedInput schema / properties / files / items / properties / content / description
      Added value: +"entire file body, not a fragment, e.g. define i32 @f() { ret i32 143 }"
    • addedInput schema / properties / files / items / properties / path / description
      Added value: +"file path including extension, e.g. left.ll"
    • changedInput schema / properties / left_file / description
      Previous value: -"Whole source file of the first implementation. The payload IS the file."New value: +"Whole source file of the first implementation. The payload IS the file. e.g. {\"path\":\"left.ll\",\"content\":\"define i32 @f() { ret i32 143 }\"}"
    • changedInput schema / properties / left_file / properties / content / description
      Previous value: -"entire file body, not a fragment"New value: +"entire file body, not a fragment. e.g. define i32 @f() { ret i32 143 }"
    • changedInput schema / properties / left_file / properties / path / description
      Previous value: -"file path including extension"New value: +"file path including extension. e.g. left.ll"
    • changedInput schema / properties / left_ir / description
      Previous value: -"LEGACY fragment of the first implementation. Still accepted and lifted into a whole file with a defaulted path; prefer left_file."New value: +"LEGACY fragment of the first implementation. Still accepted and lifted into a whole file with a defaulted path; prefer left_file. e.g. define i32 @f() { ret i32 143 }"
    • changedInput schema / properties / right_file / description
      Previous value: -"Whole source file of the second implementation. The payload IS the file."New value: +"Whole source file of the second implementation. The payload IS the file. e.g. {\"path\":\"right.ll\",\"content\":\"define i32 @f() { ret i32 143 }\"}"
    • changedInput schema / properties / right_file / properties / content / description
      Previous value: -"entire file body, not a fragment"New value: +"entire file body, not a fragment. e.g. define i32 @f() { ret i32 143 }"
    • changedInput schema / properties / right_file / properties / path / description
      Previous value: -"file path including extension"New value: +"file path including extension. e.g. right.ll"
    • changedInput schema / properties / right_ir / description
      Previous value: -"LEGACY fragment of the second implementation. Still accepted and lifted into a whole file with a defaulted path; prefer right_file."New value: +"LEGACY fragment of the second implementation. Still accepted and lifted into a whole file with a defaulted path; prefer right_file. e.g. define i32 @f() { ret i32 143 }"
  2. First observed

TDQS

A4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it names the return outcomes (WIN, CODE_IR_DIVERGED with example message, NOT_KNOWN, REFUSED_* with its trigger conditions), states determinism/statelessness/content-addressing, and honestly scopes the guarantee ('necessary, strong condition ... not full behavioural equivalence').

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?

Front-loaded with the core question, then proceeds through payload rules, grading, and outcomes in a logical order. It is dense but largely purposeful, with only minor thematic framing ('Code Court's first move') that does not add operational value.

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?

For a complex, annotation-free tool with no output schema, the description supplies the outcome vocabulary, refusal conditions, and determinism guarantees an agent needs. Remaining gaps are minor: legacy parameter forms and the exact shape of a divergent result are not fully spelled out.

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 description coverage is 100%, so a 3 baseline applies, but the description adds real semantic value by insisting the payload is textual LLVM IR (not source) and describing how the inputs may be supplied (left_file/right_file pair or a two-element array). It does not mention the legacy left_ir/right_ir parameters that the schema includes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('are two implementations equivalent by the exact value multiset of their LLVM IR constants') and elaborates what is graded. It is unambiguous and easily separable from the verify_* quantum siblings, but it never names a sibling or explicitly differentiates itself from alternatives.

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

Usage Guidelines3/5

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

It gives strong preconditions (files must be produced by clang -S -emit-llvm, swiftc -emit-ir, or rustc --emit=llvm-ir) and rough positional framing ('first move'), which implies usage. But there is no explicit when-to-use vs when-not or reference to an alternative sibling tool, so guidance is only implied.

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