Skip to main content
Glama

Pro UPI QR

Explain a UPI error code

explain_upi_error
Read-onlyIdempotent

Explain a failed UPI payment from its error code or message (e.g. U30, ZM, XH, Z9, U16, or "debit has been failed"): what it means, which side caused it, whether money was debited and when it comes back, and what the payer or merchant should do next. Covers 42 common NPCI and bank codes.

Input Schema

NameRequiredDescriptionDefault
codeYesThe code the UPI app or bank shows (e.g. U30), or words from the error message.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/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 real context beyond that by specifying the substance of the answer (cause side, debit status, refund timing, recommended action) and the coverage limit of 42 codes. It doesn't say how an unrecognized code is handled, which is the one behavioral 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, no filler. The action and the return content are front-loaded in the first sentence, and the coverage note is a compact closing qualifier. The parenthetical example list is dense but earns its place by clarifying accepted input forms.

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?

With no output schema, the description carries the burden of describing the response, and it does so by naming the five things the answer contains. It is nearly complete for a single-parameter lookup; the missing piece is what the tool returns for a code it doesn't recognize.

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% for the single `code` parameter, so the schema already explains that it accepts a code or words from the error message. The description reinforces this with additional example values but adds no new semantics such as casing, formatting, or ambiguity handling. Baseline 3 applies.

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 (explain) and resource (a failed UPI payment error code or message) and enumerates the exact outputs an agent can expect: meaning, originating side, debit status, return timing, and next steps. This is clearly distinct from every sibling, which are calculators, generators, and link readers.

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 examples (U30, ZM, XH, Z9, U16, or a message phrase like "debit has been failed") and the scope statement "Covers 42 common NPCI and bank codes" make the input domain and appropriate situation clear. It stops short of stating when not to use it or what happens for codes outside those 42, but no sibling overlaps enough to require an explicit alternative.

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