Skip to main content
Glama

Qecguard for Stim DEM lint, decode, threshold & shield

qec_decode_benchmark

Read-onlyIdempotent

Metered ($0.005): Deterministic Union-Find and lightweight MWPM-approx syndrome decoder benchmark on DEM + explicit syndromes or seeded shots.

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": {
      "dem": "<dem>"
    },
    "name": "qec_decode_benchmark"
  }
}

Input Schema

NameRequiredDescriptionDefault
demYesStim .dem v1.15 detector error model text.
seedNoDeterministic Mulberry32 PRNG seed (default 0).
shotsNoSimulated shots in [1, 50000] when syndromes omitted (default 1000).
decoderNoDecoder algorithm: uf, mwpm-approx, or both (default uf).
syndromesNoOptional explicit 2D binary detector syndrome rows.
observablesNoOptional explicit 2D binary observable flip rows matching syndromes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered; the description adds genuinely new behavioral facts: a metered $0.005 cost, deterministic seeded PRNG output, and the choice of decoder algorithms. It does not describe what the benchmark actually returns or how expensive large shot counts are, keeping it below a 5.

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?

A single front-loaded sentence that leads with the cost signal and packs the algorithm and input modes efficiently. It is dense with unexplained jargon ('DEM', 'MWPM-approx', 'shots') but wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description should say what a benchmark yields (logical error rates, decoder comparison metrics, timing); it does not. Combined with the absence of any guidance on how syndromes and observables must correspond, an agent can form the call but cannot anticipate results.

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 description coverage is 100%, so every parameter including dem, seed, shots, decoder, syndromes, and observables is already documented in the schema. The description only restates the two input modes (DEM + explicit syndromes vs. seeded shots) without adding format or interaction details such as whether observables is required alongside syndromes.

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?

Names a specific verb (benchmark) and concrete resources (Union-Find and MWPM-approx syndrome decoders over a Stim DEM), which is enough to separate it from siblings like qec_sample_syndromes or qec_inspect_dem. It never explicitly contrasts itself with those siblings, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no when-to-use / when-not-to-use guidance and no named alternative (e.g., threshold_sweep for sweeps, sample_syndromes for raw generation). The only usage signal is implicit: 'explicit syndromes or seeded shots' hints at two input modes, but which mode to pick and why is left to inference.

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.