Skip to main content
Glama

Propose bill matches

propose_bill_matches
Read-only

Pair ONE supplier's open bills to bank payments as a set, in one read-only call: each bill and each money-out bank line is used at most once, so a supplier who bills the same amounts every month cannot have one payment claimed by two bills. Pass supplier (sup-…) and optionally a from/to due-date range. A line in another currency is converted at its own date's rate and must land within 2% of the bill; among those, a line one day after the bill wins, then same-day, then by smallest FX gap. Returns {pairs [{bill, transaction, lag_days, gap_percent, tied}], settle_batches, unmatched_bills, unmatched_candidate_lines, unconvertible_lines, totals, matched, truncated, limit}. tied = true means another line fit that bill equally well, so ask the user about that pair. READ-ONLY: it proposes, never settles. Show the pairs; once the user confirms, send each settle_batches entry ({pairs [{bill, transaction}]}, at most 100 pairs) to settle_bills as its arguments. A bill in a foreign currency paid from a base-currency line may come back from settle_bills as "failed" with code "cross-currency-needs-fx"; leave those for the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoOnly bills due on/before this date (inclusive, ISO 8601).
fromNoOnly bills due on/after this date (inclusive, ISO 8601).
supplierYesThe supplier id (sup-…) whose open bills to pair.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and the description reinforces 'READ-ONLY: it proposes, never settles', but it goes well beyond: the one-use-per-bill constraint, FX conversion at the line's own date rate, the 2% threshold, deterministic tie-breaking order, and the cross-currency-needs-fx failure mode from settle_bills. This is unusually rich behavioral disclosure.

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?

Dense but front-loaded: it leads with the core pairing action and constraint, then matching rules, then return shape and workflow. Every sentence conveys distinct information, though the volume is high enough that it reads as packed rather than lean.

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?

For a complex matching tool with no output schema, the description fully compensates by enumerating the return fields inline (pairs, settle_batches, unmatched_*, totals, truncated, limit), explaining `tied`, and describing the downstream settle flow. 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 description coverage is 100%, so the schema already documents supplier, from and to. The description restates the supplier format (sup-…) and due-date range but adds no syntax or meaning the schema lacks. Baseline 3 when the schema does the heavy lifting.

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+scope: 'Pair ONE supplier's open bills to bank payments as a set, in one read-only call'. This clearly distinguishes it from siblings like match_transactions and settle_bills, and the one-to-one constraint is spelled out.

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 (pair open bills against money-out bank lines for one supplier), the workflow after calling (show pairs, then send each settle_batches entry to settle_bills), and the edge case (tied=true means ask the user). Alternatives and follow-ups are named directly.

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