Skip to main content
Glama

Boncourant

Décomposer et réconcilier une facture

decompose_invoice
Read-onlyIdempotent

Agrège des lignes de facture déjà extraites en postes canoniques (énergie, TURPE, accise, CTA, TVA, capacité, CEE, frais) et vérifie que leur somme correspond aux totaux HT/TTC déclarés. Retourne la méthode, sa version et le hash des entrées.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
line_itemsYes
stated_total_htNo
stated_total_ttcNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds meaningful behavioral context: it aggregates lines into canonical postes, verifies totals, and returns the method, version, and input hash. This provides insight into the computation and output without contradicting any annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single compact sentence that front-loads the main action (aggregation) and then adds the verification and return-value details. Every clause adds useful information, and the list of canonical categories is efficient rather than verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the annotations cover safety and an output schema exists, the description sufficiently explains the tool's purpose, inputs, and return envelope. It does not specify behavior on reconciliation failure, rounding tolerance, or the semantics of optional stated totals, but these are relatively minor given the structured schema and annotations.

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 0%, so the description must compensate. It does map conceptually to the three parameters: 'lignes de facture' corresponds to line_items, and 'totaux HT/TTC déclarés' corresponds to stated_total_ht/ttc. It also lists categories matching the component enum. However, it does not explain the confidence field, optional amount fields, or how null/absent totals affect behavior, so compensation is only partial.

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 uses specific verbs ('Agrège', 'vérifie') on a clear resource (invoice lines) and names the canonical output categories (énergie, TURPE, accise, CTA, TVA, etc.). It clearly distinguishes this tool from siblings like extract_energy_document or analyze_bill by focusing on aggregation and reconciliation of already-extracted lines.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'déjà extraites' clearly signals that this tool is meant to be used after extraction, implying the extraction workflow step. It also states what the tool verifies (sums vs declared HT/TTC totals), which gives context for when to call it. However, it does not explicitly name alternative tools or state when not to use it, so it stops short of full guidance.

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