Skip to main content
Glama

Find candidate transactions

find_candidate_transactions
Read-only

For an OUTSTANDING or OVERDUE invoice or bill, surface the candidate bank transactions that could settle it: OPEN (unreconciled) transactions within ±7 days of the document's due date whose amount matches its outstanding balance. Returns {documentid, direction, duedate, amount, doccurrency, basecurrency, candidates [transactions], best {transactionid, confidence 0.0-1.0, reason, proposal}} — best is the single strongest match (confidence >= 0.9 is a confident match). A bank line in another currency is offered when, converted at its own date's rate, it lands within 3% of the balance; its best never reaches 0.9 and carries requires_confirmation=true, because settling it needs the FX gain/loss the user confirms. Each candidate (and best) also carries a proposal: the adjusting line settling with it would require — {type :bank-charge|:fx-gain|:fx-loss, amount, currency, …} when the payment does not land exactly on the outstanding balance (a bank charge when the currencies match, an FX gain/loss when they differ), null for an exact match, or {type :indeterminate} when the dated FX rate is unavailable. READ-ONLY: it suggests a match and the adjusting line, never records either (settle bills via settle_bills; the adjusting line is for the user to confirm). To settle an invoice, first check whether the candidate's bank line already has its own income: list_transactions shows it in that line's $incomeids. If it does, settle with save_income, id = that income and accountid = the invoice id. Use record_document_payment only when the line has no income, because it always creates a new income and would count the money twice. Pass the document id (cont-… or inv-…). Run this whenever you report an overdue/outstanding invoice or bill so the likely payment is offered alongside it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentidYesThe invoice / bill / purchase document id (cont-… or inv-…) to find candidate settling bank transactions for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / documentid / description
      Previous value: -"The invoice / bill / purchase document id (cont-…) to find candidate settling bank transactions for."New value: +"The invoice / bill / purchase document id (cont-… or inv-…) to find candidate settling bank transactions for."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds the readOnlyHint annotation: it discloses the ±7 day window, 3% FX tolerance, confidence >= 0.9 threshold, requires_confirmation flag for cross-currency matches, and the exact shape of the proposal/adjusting line. It also states explicitly what it never does (record a match or adjusting line).

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?

Very dense and front-loaded — the core behavior and window lead, routing guidance follows. It is long and the proposal/currency explanation is somewhat repetitive, but nearly every sentence carries operational information rather than filler.

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?

There is no output schema, so the description carries the return-value burden itself and does so fully: it enumerates the returned fields, the candidates/best structure, and confidence semantics. Combined with the routing guidance, an agent has everything needed to call and interpret it.

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% and fully documents the single documentid parameter (cont-… or inv-…). The description only restates the same id format, adding no syntax or semantics beyond the schema, so the baseline 3 applies.

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 and resource ('surface the candidate bank transactions') scoped precisely to an OUTSTANDING or OVERDUE invoice or bill. An agent can distinguish it from settle_bills, record_document_payment, and match_transactions without opening any 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 explicit when-to-use ('Run this whenever you report an overdue/outstanding invoice or bill'), names alternatives (settle_bills, save_income, record_document_payment) and the exact conditions that select each. It even supplies a decision branch (check list_transactions for $incomeids first).

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