Skip to main content
Glama

WAI Quantum job service

Run a wasmQ envelope

run_wasmq
Read-onlyIdempotent

Run a wasmQ envelope (wai.quantum.wasmq/1 or /2, extensions/quantum-wasmq.md): an OpenQASM 3 program and the WebAssembly modules its externs call between gates, in one content-addressed envelope. The quantum part is simulated here (the stabilizer tableau, or the second version's whole-number state vector for t, Toffoli and dyadic angles), each callout a metered call of its module; the run is the same bytes on every host and engine. The job gives the counts, the calls and the fuel each used, the modules' digests, the digest of every call, and the fault that stopped the run if one did (a fault is sealed, not an error). A second-version run's energy is what the service read of the worker that ran it: the process's CPU energy on macOS, the processor packages' over its window on Linux, or the unmetered form with the reason where the host reads none, never zero; the first version states only that it is unmetered. The run is a job: past the answer's wait its id comes back to poll with get_quantum_job, and an envelope past what the service takes is refused, naming the local command. Sealed with the service's key; verify_quantum_receipt holds the job to the profile's form (section 6.5). Give the envelope as base64, or name an example; an envelope the profile refuses is refused with its code (W001 to W017).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_wasmq"
  }
}

Input Schema

NameRequiredDescriptionDefault
exampleNoOne of the profile's own envelopes instead: the surface-code round decoded in the middle of the circuit, the atom planner, a fault sealed, and the second version's exact method, feedback, angle arguments and rotations.
envelope_base64NoThe envelope (a WAI1 file of capability wai.quantum.wasmq, as `wai-quantum pack-wasmq` writes it), as standard base64.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, closed-world, idempotent), and the description adds substantial context beyond them: faults are sealed rather than raised as errors, results are deterministic ("the same bytes on every host and engine"), the run becomes a job past the answer wait, oversized envelopes are refused naming the local command, and refusal codes W001–W017 are surfaced. It also explains what the energy field means per platform, which no annotation covers.

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?

Front-loaded correctly and every clause carries content, but it is delivered as a few very long run-on sentences dense with parentheticals and version asides, which hurts scanability for an agent. Trimming the profile-version hedge and the energy-metering aside would improve it without losing decision-relevant information.

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?

Complete for a complex submission tool: inputs, job/poll semantics, refusal codes, determinism, and receipt verification are all covered, and an output schema exists so return values need not be spelled out. The one gap is that it never states whether callers must supply an envelope or an example (both optional, required count 0), leaving the mutual-exclusivity/default unspecified.

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 100%, so the baseline is 3, but the description adds real meaning: it specifies standard base64 for envelope_base64, identifies the underlying artifact (a WAI1 file of capability wai.quantum.wasmq as written by wai-quantum pack-wasmq), and frames the example enum as the profile's own envelopes. That is genuine value beyond the schema text.

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 ("Run a wasmQ envelope") and immediately defines the resource: an OpenQASM 3 program plus the WebAssembly modules its externs call, in one content-addressed envelope, with version strings wai.quantum.wasmq/1 and /2. That is far more than a restatement of the name, though it does not explicitly contrast itself with sibling runners like run_quantum_circuit.

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?

Gives concrete input routing ("Give the envelope as base64, or name an example") and downstream routing (poll with get_quantum_job, verify with verify_quantum_receipt). It does not say when to choose this tool over the other run_* siblings, so the when-to-use guidance is implied rather than stated.

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