Skip to main content
Glama

Match receipt

purch_match_receipt
Destructive

Tie a receipt to one transaction, with a reason. Refused when the total does not fit. One receipt, one transaction (P-7). Refused when the receipt total is not the row's amount or the dates are more than seven days apart — unless you pass override with a reason that says why (a split payment, a tip added at the till). Effects: receipt matched to transaction.

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": {
      "receipt_id": "<receipt_id>",
      "transaction_id": "<transaction_id>",
      "reason": "<reason>"
    },
    "name": "purch_match_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesWhy this row — part of the record.
overrideNoThe total or date does not fit and the reason explains why.
receipt_idYesThe receipt, e.g. R-0003.
transaction_idYesThe row it belongs to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare a mutating, destructive, non-idempotent operation, and the description goes further by spelling out the validation gates, the override escape hatch, and the resulting effect ('receipt matched to transaction'). It still doesn't say what happens to a pre-existing match on the receipt or what the response contains.

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?

Short and front-loaded, with the rule and its exception together. The refund/refusal condition is stated twice ('Refused when the total does not fit' then the fuller version), which is a small redundancy rather than a structural problem.

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 four-parameter mutation tool with annotations covering safety, this gives the agent enough to call it correctly: the constraint, the override path, and the effect. Missing only secondary details such as permission requirements and whether an existing match is displaced.

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; the description earns extra by explaining the interaction between two parameters — that override is only meaningful when the amount/date check fails and the reason must justify it. It also frames reason as a durable part of the record.

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 opens with a specific action and resource — 'Tie a receipt to one transaction, with a reason' — plus the cardinality rule 'One receipt, one transaction (P-7)'. It doesn't name the inverse sibling (purch_unmatch_receipt) or the other match tools, so the distinction is inferable rather than explicit.

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?

It states precisely when the call is refused (amount mismatch, dates more than seven days apart) and how to proceed anyway via override with an explaining reason, including concrete examples (split payment, tip at the till). There is no explicit 'use X instead when...' routing, which keeps it 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.