Skip to main content
Glama

WAI Quantum job service

Check a program against what it must do

check_quantum_program
Read-onlyIdempotent

One call for the inner loop: the program read (whether it reads, the reader's diagnostics with their lines and codes, its measures and smells); where the reader refuses it, the mechanical fixes the engine would make on the flagged lines and what needs a person; and given what it must do (intent, or a task with cases and constraints), each case run and graded passed, failed or unchecked by the strongest layer the engine has for its intent, with the verdict, its layer and that layer's limits, each constraint measured, what went wrong and where to look. next says what to do next. Nothing is sealed: when every case passes, grade_quantum_program seals the grade. Never call a program correct past what its verdict's level and layer say. Each case's intent is held to the service's bounds before it runs, and a case past them is refused with the local command (wai-quantum check).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "qasm": "<qasm>"
    },
    "name": "check_quantum_program"
  }
}

Input Schema

NameRequiredDescriptionDefault
qasmYesThe program, OpenQASM 3 or 2, or a generator (integer input) with its values in `inputs` or in the task's cases.
seedNoWith intent: the sampling seed (1 when not given).
taskNoWhat the program must do, in the exercise form, as grade_quantum_program takes it: `intent` or `cases` (each {"name", "inputs", "intent"}), `job` ({"shots", "seed", "noise"}) and `constraints`.
shotsNoWith intent: the shots each run samples (16 when not given; an intent is decided on the program, not on these).
inputsNoA generator's integer inputs, as {"n": 5}: the program's one case when the task gives no cases.
intentNoWhat the program must do, as run_quantum_circuit takes it: one intent or a list (wai-quantum://docs/verdicts). Give this or `task`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), yet the description adds real behavioral context beyond them: nothing is sealed, verdicts carry a layer and that layer's limits, and "never call a program correct past what its verdict's level and layer say" is an unusual and valuable caveat. It also discloses the refusal path for out-of-bounds intents. It stops short of stating cost/latency or what happens on partial failures.

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?

It is front-loaded with the "one call for the inner loop" framing, but the body is a single semicolon-chained sentence of extreme density, packing return shape, caveats, refusal behavior and a sibling cross-reference into one breath. Nearly every clause carries information, but the lack of sentence segmentation makes it slow for an agent to extract the operative instruction.

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 six-parameter tool with nested `task`, a generator path, and multiple grading layers, the description covers the awkward parts: intent vs task, generator inputs, refusal bounds, and the non-sealing contract. Return values are described in prose that partly duplicates the existing output schema, but that is redundancy rather than a gap. An agent has enough to call it correctly.

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 coverage is 100%, so the schema already documents every parameter including defaults and the intent/task exclusivity. The description reinforces the headline relationship ("given what it must do (`intent`, or a `task` with cases and constraints)") and that `inputs` supplies the generator's one case, but adds little syntax or semantic detail the schema does not already carry. Baseline 3 applies.

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?

"One call for the inner loop" frames the tool as a single-call loop body, and the description enumerates the three concrete outputs: the program read with diagnostics, the mechanical fixes the engine would apply, and per-case grading with verdict and layer. It also distinguishes itself from grade_quantum_program ("when every case passes, grade_quantum_program seals the grade"). Purpose is clear, though the verb "check" is only disambiguated by the long explanatory clause rather than a crisp first sentence.

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?

Gives explicit sequencing: this is the inner-loop call, grade_quantum_program is the sealing step only when everything passes, and `next` reports the following action. It also states a boundary condition (cases past the service's bounds are refused with the local `wai-quantum check` command). It does not address sibling options like check_equivalent or run_quantum_circuit, so it is clear context without full exclusions.

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