Skip to main content
Glama

SmartRetry Payment Tools

Decline code lookup

lookup_decline_code
Read-onlyIdempotent

Explain why a card payment was declined or failed. Accepts a decline code, response code, refusal reason or error message (for example "51", "05", "do_not_honor" or "insufficient funds") from card networks and processors such as Visa, Mastercard, Stripe and Adyen. Optionally narrow by provider.

Input Schema

NameRequiredDescriptionDefault
codeYesA decline code or message, for example "51", "05", "do_not_honor" or "insufficient funds".
providerNoOptional provider or card network to narrow the result, for example "Visa", "Mastercard" or "Stripe".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, open-world, non-destructive behavior, so the bar is lower. The description adds meaningful context: inputs may be numeric codes, symbolic names, or free-form messages from multiple networks and processors, which signals tolerant cross-provider matching. It does not say what happens when nothing matches or how many results may come back.

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 purpose and followed by input scope and the optional provider filter. Every sentence carries information; nothing is redundant within the description itself.

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 two-parameter lookup with no output schema, the description covers purpose, accepted input variety, and provider scoping well. The main remaining gap is the expected return content and behavior on ambiguous or unmatched codes, which an agent would benefit from knowing before calling.

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%, so the schema already documents both parameters, including the same examples. The description reinforces that `provider` is optional narrowing, but adds no format, precedence, or normalization detail beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 gives a specific verb and resource: explaining why a card payment was declined or failed. It also names the accepted input families and a representative set of networks and processors, which makes it clearly distinguishable from the sibling lookups (BIN, issuer, MCC). It does not explicitly reference those siblings, which keeps it just short of a 5.

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 context of use (a card payment was declined or failed) is implied by the first sentence, but there is no explicit when-to-use framing, no exclusions, and no stated alternative for cases where the code is unknown or the payment succeeded. The agent can infer the trigger, but the description does not guide choice.

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