Skip to main content
Glama
SamDreamsMaker

facturx-mcp

facturx_compute_totals

Calculate invoice totals for line amounts, subtotal, itemized VAT by rate, total including tax, and payable sum to verify figures before generating your e-invoice.

Instructions

Calcule les totaux d'une facture (HT par ligne, sous-total HT, TVA ventilée par taux, TTC, montant à payer). Utile pour vérifier les montants avant génération.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesYes
currencyYesCode devise (ex: EUR)EUR

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden itself, and it does disclose the computed outputs (HT per line, subtotal, TVA by rate, TTC, amount payable), implying a pure calculation operation. However, it does not state whether the tool recomputes line totals or trusts the supplied totalAmount, nor does it describe error handling or idempotency, leaving some behavioral ambiguity.

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?

Two short sentences with the purpose first and the usage context second; every word earns its place. The output list is compactly parenthesized and the verification use case is front-loaded, making the description easy to scan.

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

Completeness3/5

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

The tool is moderately complex (nested lines array, two required parameters) with no output schema and no annotations, and the description helpfully lists the expected output components. But it omits the return shape, how inconsistencies between quantity/unitPrice and totalAmount are handled, and what input prerequisites exist, leaving gaps an agent would need to resolve before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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

Schema description coverage is about 50%, so the description should compensate for undocumented parameters, but it adds no real input semantics beyond 'd'une facture.' It never explains that lines must be invoice lines with consistent quantity, unitPrice, and totalAmount, nor the role of currency; the lines container itself, quantity, and unitPrice remain undocumented.

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 the specific verb 'Calcule' with a precise resource ('les totaux d'une facture') and enumerates the exact outputs: per-line HT, subtotal HT, TVA by rate, TTC, and amount payable. This makes it clearly distinct from the sibling tools (generate, validate, parse, create_pdf) without opening any schemas.

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 second sentence, 'Utile pour vérifier les montants avant génération,' explicitly identifies when to use the tool (before generation, for verification) and implicitly distinguishes it from facturx_generate and facturx_validate. It does not name alternatives explicitly or provide exclusions, so it stops short of a 5.

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