Skip to main content
Glama

WAI Quantum job service

Repair a quantum program on its flagged lines

repair_qasm
Read-only

Repair a program the reader refuses, changing only the lines its diagnostics flag. The engine makes the fixes that are mechanical (a missing ;, an undeclared register's size, a measurement with no target, an unbounded while given the bound chosen, an angle the bit-exact method refuses rounded to the bits chosen with its rounding stated), and holds a fix you propose (proposed) to the flagged lines: any change to another line is rejected (J021) and nothing is changed. Returns the repaired program, each repair with its code and every line it changed, what needs a person with the reader's advice, and the verdict.

Input Schema

NameRequiredDescriptionDefault
qasmYes
rulesNofalse: only check the proposal.
sizesNoA register's size, for one used before it is declared (Q102).
proposedNoYour repaired version: taken only if every changed line is a flagged one (or a line added beside one).
diagnosticsNoCodes you saw that reading the text does not raise (Q500).
dyadic_bitsNoRound each angle the bit-exact method refuses (Q500) to the nearest multiple of 2π/2^K.
max_iterationsNoThe bound for an unbounded `while` on measured bits (Q310), as the person chose it.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Goes well past readOnlyHint=true: it enumerates the mechanical fixes the engine performs, states the guard on `proposed` (rejection code J021, nothing changed) and says what comes back. Given annotations already declare the safety profile, this is strong added context, though the longer-term effect of 'nothing is changed' is slightly ambiguous for a tool named 'repair'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core rule is front-loaded in the first clause, which is good, but the second sentence is a long run-on that packs five parenthetical fix types plus a rejection path into one breath. Every item is informative, yet the structure makes the key constraint ('only flagged lines') easy to lose.

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 seven-parameter tool with two operating modes and a nested object, the description covers modes, the rejection condition, and the shape of the result (redundantly, since an output schema exists). Adequate to call correctly; the unaddressed `diagnostics` and `rules` parameters are the only meaningful gap.

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 86%, so the baseline is 3, and the description still adds real meaning: `proposed` is constrained to flagged lines, the angle-rounded-to-bits language explains dyadic_bits, the unbounded-while bound explains max_iterations, and the undeclared-register size explains `sizes`. It does not address `diagnostics` or `rules` by name.

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 and resource ('Repair a program') plus a scoping constraint ('changing only the lines its diagnostics flag'), which an agent can act on directly. It never names the nearer siblings (improve_qasm, qasm_diagnostics, critique_qasm), so the boundary between 'repair' and 'improve' must be inferred.

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?

'A program the reader refuses' gives a trigger condition, and the description distinguishes the engine-fix path from the proposed-fix path. But no alternative tool is named and there is no explicit when-not guidance, leaving routing against improve_qasm/qasm_diagnostics to guesswork.

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