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 via settle_bills for bills or record_document_payment for invoices; the adjusting line is for the user to confirm). 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
Behavior4/5

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

Although the annotation readOnlyHint=true already indicates the tool does not modify data, the description adds critical behavioral context beyond that: it explicitly states 'READ-ONLY: it suggests a match and the adjusting line, never records either' and explains the implications of cross-currency matches (requires_confirmation=true, FX gain/loss handling). This provides valuable transparency that helps the agent understand side effects and constraints, going beyond the annotation.

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?

The description is comprehensive but somewhat long. It front-loads the key purpose and criteria, then provides detailed output structure and behavioral notes. While every sentence adds value, the description could be tightened by removing minor redundancies (e.g., repeating the read-only theme). However, it is well-structured and not wordy enough to be penalized heavily.

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?

Given the tool's complexity (returns candidates, best match, proposal, handles FX, requires confirmation), the description is remarkably complete. It explains the output structure, confidence thresholds, the proposal types, and the conditions for each. It also covers edge cases (indeterminate FX rate) and example usage. The agent has all necessary information to call and interpret results correctly, and the absence of an output schema is compensated by the description's detailed return format.

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?

The schema already describes the parameter documentid with 100% coverage. The description reinforces the format (cont-… or inv-…) and explains what the id represents (invoice/bill/purchase document). While it doesn't add entirely new information beyond the schema, it contextualizes the parameter within the tool's logic, adding slight value over the schema alone.

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 clearly states the tool's purpose: to surface candidate bank transactions that could settle an outstanding or overdue invoice or bill. It specifies the exact criteria (OPEN transactions within ±7 days, amount matches outstanding balance) and distinguishes it from related tools like settle_bills and record_document_payment, making it unambiguous.

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?

The description provides explicit guidance on when to use this tool: 'Run this whenever you report an overdue/outstanding invoice or bill so the likely payment is offered alongside it.' It also states what the tool is not for (it is read-only and does not record matches, implying use of settle_bills for bills or record_document_payment for invoices) and gives the required input format (document id). This effectively differentiates it from alternatives.

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