Skip to main content
Glama
verifactu-mcp

verifactu-mcp

by ArceeDev

build_facturae

Read-onlyIdempotent

Build a Facturae 3.2.2 invoice XML from plain data, compute totals, and check it against the official XSD to catch invalid invoices before signing or sending.

Instructions

Build a Facturae 3.2.2 invoice (XML) from plain data, with totals computed and the official XSD checked.

invoice: number (max 20), series, issue_date, operation_date?, currency (EUR), description?, notes?, legal_literals? [text], receiver_contract_reference?, seller / buyer: nif, name (company name, or first name with first_surname/second_surname for a person), address, post_code, town, province, country (ISO alfa-3, default ESP), residence? (R/U/E), email?, phone?; buyer.face: {oficina_contable, organo_gestor, unidad_tramitadora, organo_proponente?} DIR3 codes for public administration invoices (FACe), or administrative_centres: [{code, role 01-04, name?}], lines: [{description, quantity, unit_price, tax_rate (21, 10, 4, 0...), discount_pct?, surcharge_rate? (recargo de equivalencia 5.2, 1.4, 0.5), tax_type? (01 IVA, 03 IGIC, 02 IPSI), unit? (01 unidades), receiver_reference?, file_reference?, article_code?}], withholding?: {rate} (IRPF retention, e.g. 15 or 7), payment?: {due_date, method (transferencia, domiciliacion, efectivo, tarjeta...), iban, bic?}. Amounts accept "1.234,56" or "1234.56". Returns xml (UTF-8, unsigned), xml_base64, totals and the validation report. Invalid data is refused before charging. Sign the XML (XAdES) before sending to FACe.

Input Schema

NameRequiredDescriptionDefault
invoiceYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations it discloses that totals are computed, the official XSD is checked, invalid data is refused before charging, and the XML is returned unsigned and UTF-8. The credit-charge implication sits somewhat uneasily with readOnlyHint=true, but it is disclosure rather than contradiction, and the description adds real behavioral context.

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?

The first sentence front-loads purpose and outputs, and the long field listing is justified by the bare schema. The block is dense and compressed into a single unformatted slab, which costs some scannability, but no sentence is wasted.

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 nested builder the coverage is strong: field inventory, amount formatting ('1.234,56' or '1234.56'), tax/recargo enumerations, public-administration DIR3 codes, and the signing prerequisite. With an output schema present, return values are covered and the description still names xml, xml_base64, totals, and the validation report.

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

Parameters5/5

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

Schema coverage is 0% and the single parameter is an open object, so the description carries the full burden and does so with a detailed field map: required/optional fields, defaults (EUR, ESP), person-vs-company name shapes, DIR3/FACe face structure, line-level tax types and recargo rates, withholding, and payment blocks.

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 opens with a specific verb+resource+standard: build a Facturae 3.2.2 invoice as XML, with totals computed and XSD validation. It also implicitly separates itself from the sibling validate_facturae (build vs. validate) and from the verifactu_* tools by naming the FACe/Facturae domain.

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?

Usage context is clear: it is for turning plain data into a signed-ready XML for FACe, and the closing sentence sets a downstream prerequisite ('Sign the XML (XAdES) before sending to FACe'). What is missing is explicit routing, e.g. when to prefer validate_facturae or whether this can replace a build+validate sequence.

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