Skip to main content
Glama
mcp-facturacion-electronica-es

mcp-facturacion-electronica-es

Es Generate B2B Einvoice Es

es__generate_b2b_einvoice_es

Generate EN 16931-compliant B2B electronic invoices in UBL or Facturae 3.2.2 for Spanish Crea y Crece, with validation against the OASIS UBL 2.5 schema.

Instructions

Genera una factura B2B conforme a EN 16931 en formato UBL o Facturae 3.2.2.

Según la Ley 18/2022 'Crea y Crece'. El formato UBL sigue el anexo I de la Orden HAC/1028/2026 (identificador de especificación y tipo de proceso de la solución pública de la AEAT, identificación fiscal del vendedor y del comprador, dirección postal obligatoria) y se valida contra el esquema OASIS UBL 2.5.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoice": "<invoice>"
    },
    "name": "es__generate_b2b_einvoice_es"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoFormato de salida: 'ubl' (por defecto) o 'facturae'.ubl
invoiceYesDatos de la factura.
is_copyNoSolo UBL. BT-ES-1: true marca el documento como copia fiel; por defecto es un original.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • addedInput schema / properties / is_copy
      Added value: +{
      +  "default": false,
      +  "description": "Solo UBL. BT-ES-1: true marca el documento como copia fiel; por\ndefecto es un original.",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / format / enum
      Removed value: -[
      -  "ubl",
      -  "facturae"
      -]
    • addedInput schema / properties / invoice / additionalProperties
      Added value: +true
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. First observedv0.0.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It does add real behavioral context: output conforms to EN 16931, is validated against the OASIS UBL 2.5 schema, and the UBL variant carries specific mandatory elements (specification identifier, process type, seller/buyer tax IDs, mandatory postal address). It is silent on what happens on validation failure, whether the result is signed, and whether anything is transmitted — meaningful gaps for a generation tool with no annotation safety profile.

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?

Two short paragraphs, front-loaded with what the tool produces and which formats it covers, followed by the mandatory-data details. The legal citations are load-bearing for compliance context rather than filler, though the OASIS UBL 2.5 validation clause could be tightened.

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?

An output schema exists, so return values need not be described. However, for a tool whose sole required parameter is an undocumented free-form object, and whose output is a legally regulated document, the description should say more about payload structure, failure behavior on schema-invalid input, and how this relates to the signing and validation siblings.

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 earns an increment because the required 'invoice' object is an opaque free-form object (additionalProperties: true, no documented fields) and the text enumerates the fields a UBL invoice must carry. It also gives the regulatory meaning of 'is_copy' (fiel copy vs original under BT-ES-1) beyond the schema's own wording, though it never explains the structure of the nested invoice payload itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Genera una factura B2B') and names the supported output formats (UBL, Facturae 3.2.2) plus the governing standard (EN 16931). It does not, however, distinguish this tool from the sibling 'es__generate_facturae_xml', which by name appears to overlap on the Facturae output path, so the agent must infer the boundary.

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

Usage Guidelines3/5

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

Usage is only implied through regulatory context (Ley 18/2022 'Crea y Crece', Orden HAC/1028/2026), which signals that this applies to Spanish B2B invoicing under the public AEAT solution. There is no explicit when-to-use statement, no prerequisite check (e.g. whether a mandate applies — a sibling exists for that), and no routing to the validation or signing siblings.

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