Skip to main content
Glama

Decode VietQR image

vietqr_decode
Read-onlyIdempotent

Decode a VietQR code from a PNG image to extract bank, account, amount, note, and CRC validity, with clear errors for unreadable files or missing QR codes.

Instructions

Read the QR code in a PNG image file and decode it like vietqr_parse: bank, account, amount, note, CRC validity. Returns READ_ERROR for an unreadable/non-PNG file and NO_QR when no QR code is found.

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": {
      "path": "<path>"
    },
    "name": "vietqr_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to a PNG image containing a VietQR code

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 and closed-world, so the safety profile is covered; the description adds genuinely new behavior by naming the failure modes READ_ERROR (unreadable/non-PNG) and NO_QR (no code found) and enumerating decoded fields. It stops short of describing nesting or ordering of the decoded output, so 4 rather than 5.

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, no filler, front-loaded with the action, then the equivalence to the sibling, then error codes. Every clause carries information an agent needs.

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

Completeness5/5

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

For a single-path, stateless read tool with no output schema, the description covers the input constraint, the returned fields, and both error outcomes — nothing essential to correct invocation is missing.

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?

With one parameter at 100% schema description coverage, the schema already states that the path points to a PNG containing a VietQR code. The description's mention of PNG adds no format, size, or resolution detail beyond that, so this is the baseline 3.

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 specific verb and resource ('Read the QR code in a PNG image file and decode it') and explicitly anchors the output to the sibling vietqr_parse (bank, account, amount, note, CRC validity), so an agent can distinguish image-decoding from string-parsing without opening either schema.

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?

The PNG image framing and the 'like vietqr_parse' comparison make the selection context clear: use this when the input is an image, use the parse sibling when you already have the payload string. There is no explicit 'do not use for X' exclusion or stated prerequisite, so it falls short of a 5.

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