Skip to main content
Glama

Match invoice transaction

match_invoice_transaction

Find and link the bank transaction that paid an invoice. Run after book_invoice and BEFORE sevdesk_push_documents so the local record is complete before it goes to sevDesk. Ranks unmatched transactions by amount closeness, date proximity to the invoice date, and payee/vendor word overlap. Without transaction_id it only returns ranked candidates; pass transaction_id to link a specific one, or confirm:true to accept the top candidate when it is clearly ahead of the rest.

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": {
      "document_id": "<document_id>"
    },
    "name": "match_invoice_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoLink the top candidate automatically, but only when it scores well AND no other candidate is close (default false)
days_windowNoDays either side of the invoice date to consider (default 60)
document_idYesThe booked invoice
transaction_idNoLink this specific transaction. Omit to just see candidates.
amount_toleranceNoAbsolute amount tolerance, e.g. 0.50 to allow for FX/bank rounding (default 1.00)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the write profile is already known; the description adds real value by disclosing the ranking criteria (amount closeness, date proximity, payee overlap) and the safety guard on confirm (only when 'clearly ahead'). It does not address re-linking the same transaction or what a link does to the local record, which matters given idempotentHint=false.

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-loaded with the action, then ordering constraint, then ranking behavior, then the parameter-mode rules. Every sentence carries distinct information and none is filler.

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 still indicates what comes back in read mode ('ranked candidates') and how the mutating modes differ, which is enough to call it correctly. It stops short of describing candidate fields or the result of a successful link, a minor gap for a non-idempotent write tool.

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 defaults and field meanings are already documented, but the description adds cross-parameter semantics the schema cannot express: transaction_id switches from read to link mode, and confirm only fires under a comparative-score condition. That is meaning beyond the schema, not a restatement.

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 pair and resource: 'Find and link the bank transaction that paid an invoice.' The invoice-payment framing distinguishes it from sibling matchers like match_payment_run and match_transfer without needing their schemas.

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 explicit sequencing ('after book_invoice and BEFORE sevdesk_push_documents') and spells out the three invocation modes: omit transaction_id for ranked candidates, pass transaction_id to link, or confirm:true to accept the top candidate. When-to-use and when-not are both covered.

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