Skip to main content
Glama

Match transaction

match_transaction
Read-only

Deterministically match one income/expense entry to its bank transaction. Given the entry (name/amount/date/direction) and amount-filtered candidate transactions, returns {transactionid, confidence 0.0-1.0, reason}. confidence >= 0.9 is a confident link; below that, escalate to a human/LLM judge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoThe entry's date (YYYY-MM-DD); used for date-proximity scoring.
nameNoThe entry's name/description text; used for text-similarity scoring against each candidate.
amountNoThe entry's amount to match on (required). Compared against each candidate's value.
currencyNoThe entry's ISO currency (e.g. ZAR). When given, a candidate in another currency is converted at its own date's rate and kept only within 3% of the amount; such a match is capped below 0.9, carries requires_confirmation=true and the FX gain/loss proposal. Omit for same-currency matching.
directionYesWhich side the entry sits on: "expense" or "income" (required).
candidatesNoCandidate bank transactions to weigh, typically from search_amount — each a map with at least id, value, date and description. Required in practice; an empty or absent list yields no match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "The entry's ISO currency (e.g. ZAR). When given, a candidate in another currency is converted at its own date's rate and kept only within 3% of the amount; such a match is capped below 0.9, carries requires_confirmation=true and the FX gain/loss proposal. Omit for same-currency matching.",
      +  "type": "string"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / amount / description
      Added value: +"The entry's amount to match on (required). Compared against each candidate's value."
    • addedInput schema / properties / candidates / description
      Added value: +"Candidate bank transactions to weigh, typically from search_amount — each a map with at least id, value, date and description. Required in practice; an empty or absent list yields no match."
    • addedInput schema / properties / date / description
      Added value: +"The entry's date (YYYY-MM-DD); used for date-proximity scoring."
    • addedInput schema / properties / direction / description
      Added value: +"Which side the entry sits on: \"expense\" or \"income\" (required)."
    • addedInput schema / properties / name / description
      Added value: +"The entry's name/description text; used for text-similarity scoring against each candidate."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses deterministic behavior and the confidence threshold, adding value beyond the readOnlyHint annotation. It explains the confidence cutoff and escalation, but does not mention edge cases like empty candidate lists or exact behavior when no match is found. Given annotations cover read-only safety, this is solid.

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 with no filler. The main purpose is front-loaded, and the threshold and escalation rule are stated efficiently. Every sentence earns its place.

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 explains the return structure and confidence threshold adequately. It also covers how candidates are expected to be provided. Minor omissions like empty-candidate behavior are acceptable given the tool's simplicity and the schema's richness.

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 coverage is 100% with detailed parameter descriptions, so the description adds little new semantics. It does note 'amount-filtered candidate transactions' in the text, which is a usage hint, but overall the schema already carries the meaning. Baseline 3 is appropriate.

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?

The description states a specific verb ('match') and resource ('one income/expense entry to its bank transaction'), and clearly distinguishes from sibling tools like find_candidate_transactions by specifying it operates on pre-filtered candidates. It also details the output structure, making the tool's function unambiguous.

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 description provides clear context on when to use the tool: after obtaining amount-filtered candidates (typically from search_amount) and includes an explicit escalation rule when confidence < 0.9. However, it does not explicitly contrast with the sibling tool match_transactions (plural) or other alternatives, leaving some room for inference.

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