Skip to main content
Glama
cmendezs

mcp-facturacion-electronica-es

Es Build Sii Invoice Record

es__build_sii_invoice_record

Creates SOAP XML records for AEAT SII invoice submissions, supporting issued or received invoices and alta, modification, or baja communication types.

Instructions

Construye un registro XML AEAT SII en formato SOAP.

Emisión FacturaExpedida o recepción FacturaRecibida, conforme a la guía técnica SII v3.0 (abril 2024). Soporta TipoComunicacion A0 (alta), A1 (modificación) y A4 (baja).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesDatos de la factura.
record_typeYesDirección: 'issued' (expedida) o 'received' (recibida).
clave_regimenNoClaveRegimenEspecialOTrascendencia (por defecto '01').01
communication_typeNoTipoComunicacion: A0 alta (por defecto), A1 modificación, A4 baja.A0

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / clave_regimen
      Added value: +{
      +  "default": "01",
      +  "description": "ClaveRegimenEspecialOTrascendencia (por defecto '01').",
      +  "type": "string"
      +}
    • changedInput schema / properties / communication_type / description
      Previous value: -"TipoComunicacion: A0 alta (por defecto), A1 modificación, A4 baja."New value: +"TipoComunicacion: A0 alta (por defecto),\nA1 modificación, A4 baja."
    • removedInput schema / properties / communication_type / enum
      Removed value: -[
      -  "A0",
      -  "A1",
      -  "A4"
      -]
    • addedInput schema / properties / invoice / additionalProperties
      Added value: +true
    • removedInput schema / properties / record_type / enum
      Removed value: -[
      -  "issued",
      -  "received"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. First observedv0.0.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the output format (XML SOAP), the SII version (v3.0, April 2024), and supported TipoComunicacion values (A0/A1/A4). It does not disclose whether the tool validates the XML, whether it persists anything, or what the output schema contains, but the description does add meaningful behavioral context beyond the schema.

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 description is compact and front-loaded: it states the core purpose in the first sentence, then adds version and communication-type details. Every sentence earns its place, though the Spanish phrasing is slightly dense and could be clearer about the build-only scope.

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 has an output schema and 100% parameter coverage, so the description need not explain return values. However, with no annotations and a complex domain (SII XML/SOAP), the description could usefully mention whether the record is validated, whether it handles signing, and how it relates to submission tools. It is adequate but leaves the agent to infer the build-vs-submit boundary.

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 100%, so the schema already documents all four parameters. The description adds context for record_type ('issued' vs 'received') and communication_type (A0/A1/A4), but these are also present in the schema. The description does not add meaning beyond the schema for invoice or clave_regimen, so a baseline 3 is appropriate.

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 clearly states the tool builds an AEAT SII XML record in SOAP format, distinguishing between issued (FacturaExpedida) and received (FacturaRecibida) invoices, and lists supported communication types. It is specific about the resource and format, though it does not explicitly differentiate from siblings like es__generate_sii_correction or es__submit_sii_batch; the verb 'build' and XML/SOAP focus make the core purpose clear.

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?

The description implies usage: it is for constructing SII records, not submitting them, and it names the supported communication types. However, it does not explicitly state when to use this tool versus alternatives such as es__submit_sii_batch (submission) or es__generate_sii_correction (corrections). The context is clear enough for an agent to infer the build-vs-submit distinction, but explicit when/when-not guidance is missing.

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