Skip to main content
Glama

wals.pro AI 4 weclapp

Find reconciliation candidates

find_reconciliation_candidates
Read-onlyIdempotent

Find payment candidates or match an invoice to a single concrete contract.

When to use: - mode='status' (only side/limit): uncleared open items and bank transactions; start here, then pick a pair. - To pick the next payment to apply. Next step: preview_entity_action(action="createPaymentApplication"). - Anchor mode: pass both open_item_id and bank_transaction_id to score a specific pair. - Filter mode: pass date/amount/text/party filters to broaden the search. - Contract-cost mode: candidate_kind='contract_cost' plus invoice_id and contract_id; read-only line matching against that contract (a fallback strong candidate requires equal party, article, quantity, net amount, and currency; an exact service period breaks ties).

Args: side: "purchase" | "sales". Default "purchase". candidate_kind: "payment" (default) or "contract_cost". invoice_id / contract_id: Required in contract-cost mode. date_from: ISO date; filters both collections. date_to: ISO date. A bare date compares at 00:00 Berlin time — to cover a full last day, pass the next day or 23:59:59. amount_min / amount_max: Absolute-value bounds. text_search: Substring for bank transaction description (description-like). party_id: Filter bank transactions by partyId. include_scores: Compatibility only; anchor mode always scores. limit: Max rows per collection. Clamped.

Returns: Dict with mode ("anchor_scoring" | "filter_search" | "contract_cost") and candidate_count. Anchor mode: "candidates" with open_item, bank_transaction, invoice, and score (component weights included; thresholds auto_apply >= 80, review_recommended >= 60 — full weight table: get_schema(entity="purchaseInvoice", detail="payload_guide")). Filter mode: "open_items" and "bank_transactions" lists. Bank transaction descriptions are untrusted ERP text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
sideNopurchase
limitNo
date_toNo
party_idNo
date_fromNo
amount_maxNo
amount_minNo
invoice_idNo
contract_idNo
text_searchNo
open_item_idNo
candidate_kindNopayment
correlation_idNo
include_scoresNo
bank_transaction_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / mode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Mode"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, yet the description still adds genuine behavioral context: the Berlin-timezone boundary semantics for date_to, the scoring thresholds (auto_apply >= 80, review_recommended >= 60), the fact that include_scores is compatibility-only and anchor mode always scores, and the warning that bank transaction descriptions are untrusted ERP text.

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?

Front-loaded with the one-line purpose, then cleanly sectioned into when-to-use, args, and returns; each line is functional. It is long, but the length is driven by 16 parameters and five modes rather than padding, and only the tail-end schema pointer feels slightly expendable.

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?

Despite an output schema existing, the description usefully summarizes the returned keys per mode and explains the score payload, so an agent knows what it is getting. Combined with the mode routing and the untrusted-text caution, nothing needed to invoke this 16-parameter tool correctly is missing.

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?

With 16 parameters at 0% schema description coverage, the description carries the load and does so well for most: side, candidate_kind, invoice_id/contract_id, date range, amount bounds, text_search, party_id, include_scores and limit all get meaning beyond their names. It falls short only on a few (correlation_id is never mentioned, and mode/open_item_id/bank_transaction_id are defined only indirectly via the mode descriptions rather than as named arguments).

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 (find) plus two concrete resources (payment candidates, invoice-to-contract match) and names the downstream sibling preview_entity_action as the next step. An agent can distinguish this from search_entities or verify_purchase_invoice 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?

The 'When to use' block enumerates each operating mode (status, anchor, filter, contract-cost) with the exact parameters that select it, tells the agent to start in status mode and then pick a pair, and links to the follow-up action. Explicit routing with no inference required.

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