Skip to main content
Glama

qr_batch

Scans many QR code images in one call from a source list or directory glob, optionally runs OCR, and returns per-file results with aggregate counts.

Instructions

Scan many images in one call. Accepts an explicit list of sources or a directory plus glob pattern; optionally runs OCR on every image too. Returns per-file results and aggregate counts.

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

Input Schema

NameRequiredDescriptionDefault
repairNoAllow damaged-code repair per file
patternNoGlob pattern inside directory*.png
sourcesNoList of paths / base64 / data URIs
directoryNoDirectory to scan (non-recursive)
max_filesNoHard cap on files processed
include_ocrNoAlso run OCR on each image
ocr_backendNoauto
max_variantsNoPreprocessing variants per file

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses both input modes, that OCR is optional per image, and that results come back per-file plus as aggregate counts. It omits per-file failure behavior (partial errors), default caps like max_files=50, and that repair defaults to true, which matters for what output an agent should expect.

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?

Three tight sentences, front-loaded with the batch scope and then the input modes. The final sentence on return values overlaps with the existing output schema, which costs a little, but nothing is padded or vague.

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 an 8-parameter tool with 88% schema coverage, an output schema, and no annotations, the description covers input modes, the optional OCR path, and aggregate return shape. The remaining gap is behavioral: partial-failure handling and the effect of the default repair/limits settings are unstated.

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 88%, so the schema already documents nearly every parameter including defaults and bounds. The description adds only the relationship between sources and directory+pattern and that OCR applies per image, which is modest value over the structured fields, 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?

States a specific verb and scope: 'Scan many images in one call,' making the batch nature explicit, and then names the two accepted input modes. It does not explicitly say what is being scanned (QR codes) or name the single-image siblings like qr_decode, so an agent must infer the batch-vs-single split from the name.

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?

The description implies when to use it (many images, bulk operation) and clarifies that the sources list and directory+pattern are alternative input paths. It gives no explicit when-not guidance, no routing to qr_decode/qr_detect for single images, and no mention of the include_ocr trade-off versus calling ocr_image separately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.