Skip to main content
Glama

Match to a payment

rec_match

Tie a statement row to the payments or refunds recorded here that it is. They must add up to the row exactly. The row then posts nothing itself: the payment already did. A deposit on the statement is often a payment already recorded against an invoice. Read rec_candidates: per row, what fits by amount, date and name. Show the person, then match with a reason ("the Northwind ACH is their payment NW-ACH-2210"). One row can be several payments (a deposit of three checks); the items must add up to the row exactly, never "close enough". A row already booked as income or spending cannot be matched: that would count the money twice; say what it is booked as and let the person decide. Never record a payment just to have something to match. Effects: statement row matched; it posts nothing itself; the payments it is are now on the statement.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe payments or refunds it is; they add up to the row exactly.
reasonYesWhy they are the same money.
transaction_idYesThe statement row. An existing purch_transaction id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent mutation; the description goes further by disclosing the precise write semantics — the statement row is marked matched but posts nothing because the payment already posted — and by naming a dangerous precondition (double-counting on already-booked rows) with the recommended human-handoff behavior. That is real context beyond the hint flags.

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?

Front-loads the core action and constraint ('must add up to the row exactly') before the workflow guidance, then closes with an explicit Effects block. Some restatement of the exact-sum rule and the 'posts nothing' point, but both are load-bearing warnings for a financial mutation.

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 3-parameter mutation with no output schema, the description covers preconditions (candidate lookup), the matching rule, the disallowed cases, the human-escalation path, and the resulting state. Nothing an agent needs in order to call it safely is missing.

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 all three parameters are already documented, but the description adds genuine business semantics: items must sum to the row exactly, 'never close enough', and may be multiple per row; reason must articulate why they are the same money. It stops short of restating the item key format the schema already gives.

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 (tie/match) and both resources involved (a statement row and recorded payments/refunds), and explicitly frames what the tool is not: it does not post anything itself. Sibling routing is implied through the named rec_candidates tool, so an agent can separate it from rec_unmatch or purch_match_receipt without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit workflow (read rec_candidates first, show the person, then match with a reason), an explicit exclusion ('a row already booked as income or spending cannot be matched: that would count the money twice'), and an explicit anti-pattern ('Never record a payment just to have something to match'). The rule for one-to-many matching (a deposit of three checks) is stated with the exact-sum constraint.

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.