Skip to main content
Glama

Match to a payment

rec_match
Destructive

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.

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

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.4/5.0
Behavior4/5

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

The annotations already flag a mutation (readOnlyHint=false, destructiveHint=true), and the description adds real accounting semantics: the row posts nothing itself, the payment it is now appears on the statement, and double-counting is the failure mode to avoid. The exactness constraint ('never close enough') is a behavioural rule an agent could not infer. It stops short of saying the match is reversible (rec_unmatch exists) or what happens if one item in a multi-item match fails, which keeps it at 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, but the text repeats itself: the exact-sum rule appears both in the opening and again mid-paragraph, and 'posts nothing itself' is stated twice (opening and Effects). Phrasing is occasionally loose ('the payments or refunds recorded here that it is', 'the payments it is are now on the statement'). Trimming the duplication would sharpen it without losing content.

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 three-parameter mutation with no output schema, the description covers intent, preconditions, exactness, and side effects, which is most of what an agent needs. The remaining gaps are atomicity of multi-item matches and reversibility via rec_unmatch, both plausible failure points for a reconciliation agent. No annotation contradicts the described effects.

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 the baseline is 3; the description earns above that by clarifying the two non-obvious parameters. It explains that 'items' may hold several payments that must sum exactly to the row, and it models the 'reason' field with a concrete example ('the Northwind ACH is their payment NW-ACH-2210'). It adds no extra detail on transaction_id beyond the schema's own 'existing purch_transaction id'.

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+resource pair: tie a statement row to the payments or refunds already recorded here. It also draws the boundary against the read-side sibling by naming rec_candidates as the way to find fits. An agent can tell what this does and what it does not do (it does not itself post or record money).

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: per row, what fits by amount, date and name'), an explicit exclusion ('a row already booked as income or spending cannot be matched'), and a guardrail ('Never record a payment just to have something to match'). It also addresses the non-obvious multi-item case (one row = several payments) with the exactness requirement. This is when/when-not guidance of the kind that changes agent behaviour.

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.