Skip to main content
Glama
mcp-lettrage

mcp-lettrage

by m02xime

rapprocher_paiement

Read-only

Reconciles a bank statement line with candidate invoices by analyzing the payment label and amount, returning ranked matches for single, multi-invoice, or gap-adjusted payments.

Instructions

Point d'entrée pour lettrer une ligne de relevé bancaire. Analyse le libellé (références de facture même tronquées ou mal tapées, nom du payeur même abrégé ou via un alias/holding) et le montant, puis renvoie les meilleures hypothèses classées : une facture, plusieurs factures payées en un virement, ou une facture avec un écart (escompte, avoir déduit, paiement partiel, trop-perçu, double paiement). Chaque candidat porte un score 0-1, le type et le montant de l'écart, et les raisons du score. Score ≥ 0,8 : rapprochement fiable. Entre 0,5 et 0,8 : vérifier avec solde_client ou expliquer_ecart. Fournir releve_id si la ligne est en base, sinon libelle + montant.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rapprocher_paiement"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoDate d'opération AAAA-MM-JJ
libelleNoLibellé brut, si pas de releve_id
montantNoMontant reçu en euros, si pas de releve_id
releve_idNoId de la ligne de relevé

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description adds the substantive behavior: it returns ranked candidates with a 0–1 score, discrepancy type and amount, and scoring reasons, plus the confidence thresholds. It does not discuss cost, latency, or limits on candidate count, so it falls short of the highest mark, but the added context is substantial for a read-only tool.

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?

Purpose is front-loaded in the first sentence, followed by analysis scope, return shape, and confidence routing in a logical order. The parenthetical enumeration of discrepancy cases is dense but every item carries matching meaning; the text is long yet not padded.

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 must carry the return contract, and it does: candidate list, score range, discrepancy type and amount, and reasons. Combined with the confidence thresholds and input preconditions, 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics beyond the schema by explaining the mutual exclusivity of releve_id versus libelle + montant and why each path exists. The 'date' parameter is left to the schema alone, which keeps this just under 5.

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 ('lettrer une ligne de relevé bancaire') and then spells out exactly what the analysis covers: libellé (truncated/mistyped invoice refs, abbreviated payer names/aliases/holdings) and montant. It also names the concrete hypothesis shapes it returns, which distinguishes it clearly from sibling tools like chercher_factures or solde_client.

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?

Explicit routing rules are given: score ≥ 0.8 means reliable match, 0.5–0.8 means verify with solde_client or expliquer_ecart, and the input precondition (releve_id if the line is in the DB, otherwise libelle + montant) is stated. Both when-to-use and which alternative to reach for are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.