Skip to main content
Glama

Quantum circuit stats

quantum_circuit_stats
Read-onlyIdempotent

Qubits, gate counts, two-qubit gates and depth of a circuit after rewriting to basic gates, so you know what you are about to run before paying for hardware. The circuit is not run or stored.

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": "quantum_circuit_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
qasmYesThe circuit as OpenQASM 2.0 or 3.0 text (Qiskit: qasm2.dumps(circuit))

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/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 still adds real value beyond them: it states the circuit is not stored (no persistence side effect) and clarifies that counts are computed after rewriting to basic gates, which materially affects the numbers an agent will see. It says nothing about failure behavior for malformed QASM, which is the only notable gap.

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

Conciseness5/5

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

Two sentences, front-loaded with the returned metrics before the rationale, and not a word is wasted. The scoping disclaimer is placed last where it reads as a qualifier rather than a preamble.

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 one-parameter, no-output-schema tool, the description covers what is returned and what does not happen (no execution, no storage), which is enough to call it correctly. What is missing is minor: behavior on invalid or unparsable QASM, and whether depth/gate counts follow a specific transpiler version.

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% and the single qasm parameter is already documented as OpenQASM 2.0/3.0 text with a Qiskit example. The description adds no further meaning about the parameter, so the baseline of 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?

The description names the exact metrics returned (qubits, gate counts, two-qubit gates, depth) and the key transformation applied (rewriting to basic gates), so the resource is unambiguous. It stops short of naming a specific sibling, but the line 'The circuit is not run or stored' effectively separates it from the run/execution tools in a way an agent can act on.

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?

Provides a clear use context: run this before paying for hardware, i.e., as a pre-flight cost/size check. It does not spell out explicit exclusions (e.g., 'if you actually want results, use quantum_run_circuit'), but the when-to-use is inferable and correct from the stated motivation.

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