Skip to main content
Glama

Check that a QR design will scan

qr_scan_check
Read-onlyIdempotent

Run the print check on a design before it goes to the printer: the engine renders it and decodes it under 13 simulated conditions (small print, distance, blur, dim light, low contrast, glare, noise, rotation) and returns the same report the builder's scan panel shows, plus the minimum print size at table, wall and street distance. Call it after qr_generate when the result is going to be printed. fileFormat/outputWidth/outputHeight are ignored: the check renders its own bitmap.

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": {
      "content": "<content>"
    },
    "name": "qr_scan_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoOptional caption rendered below the QR (e.g. a slogan).
contentYesThe text or URL the QR will encode. Required.
logoUrlNoPublic HTTPS URL of a logo image to embed at the center.
eccLevelNoError-correction level (L=7%, M=15%, Q=25%, H=30%). Higher levels survive more damage but are denser.
frameTextNoLabel inside the frame, max 40 characters, any language (e.g. "Scan me", "View the menu"). Defaults to "Scan me".
fileFormatNoOutput format. Defaults to "png".
frameColorNoFrame colour in hex, also the label background. Defaults to "#000000".
frameStyleNoCall-to-action frame around the whole QR with a short label. Never covers the QR or its quiet zone.
moduleShapeNoShape of the small modules in the QR matrix.
outputWidthNoOutput width in pixels (raster) or viewport units (svg). 64-4096.
outputHeightNoOutput height in pixels (raster) or viewport units (svg). 64-4096.
primaryColorNoForeground/module color in hex (e.g. "#000000" or "#0a84ff").
frameTextColorNoFrame label colour in hex. Defaults to "#FFFFFF".
backgroundColorNoBackground color in hex (e.g. "#ffffff"). Use "transparent" for no background.
additionalConfigNoEscape hatch: any other QrConfig field the engine accepts (gradient stops, dot rotation, etc.). Merged on top of the structured fields above.
finderInnerShapeNoShape of the inner dot of the three corner finder patterns.
finderOuterShapeNoShape of the outer ring of the three corner finder patterns.

Output Schema

NameRequiredDescriptionDefault
gradeYesPrint-readiness grade of the design.
sizesYes
versionYesQR version (symbol size).
elapsedMsNoHow long the simulated scan took.
conditionsYes
designScoreNoStatic design score (0-100) from the engine's scannability rules.
resolutionsNoHow small the modules can get and still be read: one step per tested size, largest first.
engineAdjustsNoTrue when the engine had to strengthen the design (its scan fallback) for the returned file to read back, so the file differs from the exact request.
symbolModulesYesModules per side of the symbol.
designWarningsNoQrConfig fields the static rules flagged.
smallestModulePxNoSmallest module in the rendered bitmap, in pixels.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / engineAdjusts
      Added value: +{
      +  "description": "True when the engine had to strengthen the design (its scan fallback) for the returned file to read back, so the file differs from the exact request.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / resolutions
      Added value: +{
      +  "description": "How small the modules can get and still be read: one step per tested size, largest first.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "modulePx": {
      +        "description": "Module size in pixels at this step of the ladder (6 down to 1.5).",
      +        "type": "number"
      +      },
      +      "passed": {
      +        "type": "boolean"
      +      },
      +      "readers": {
      +        "description": "How many of the engine's two readers decoded it at this size (0-2).",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "modulePx",
      +      "passed",
      +      "readers"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, but the description goes further: it discloses that the engine renders its own bitmap, that fileFormat/outputWidth/outputHeight are silently ignored, and that the return includes minimum print sizes at three distances. Minor wobble: it claims "13 simulated conditions" while only eight are listed in the parenthetical.

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?

Two sentences, front-loaded with the purpose, then the call-timing rule, with the parameter caveat last. Slightly dense in the parenthetical condition list, and the reference to "the same report the builder's scan panel shows" leans on product knowledge rather than self-contained wording.

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?

An output schema exists, so return values need no elaboration, and the safety profile is covered by annotations. For a 17-parameter tool the description covers the one real pitfall (ignored output parameters) and the call timing; the only shortfall is the mismatched condition count, which could mislead about check coverage.

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 baseline is 3, but the description earns above that by telling the agent that three otherwise-valid parameters (fileFormat/outputWidth/outputHeight) have no effect here — a fact not derivable from the schema itself and one that would otherwise cause wasted calls or confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource ("Run the print check on a design") and immediately explains the mechanism: renders and decodes under simulated conditions. It is clearly distinguishable from the qr_generate sibling, which produces designs rather than validating them.

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 an explicit timing rule: "Call it after qr_generate when the result is going to be printed." That covers when to use it and implies skipping it for screen-only output, but no alternative tool is named for the non-print case and no explicit when-not statement is given.

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.