Skip to main content
Glama
cmendezs

mcp-facturacion-electronica-es

Es Submit Sii Batch

es__submit_sii_batch

Submit up to 10,000 invoice records to the AEAT SII SOAP endpoint. Request a confirmation summary first, then finalize with a token to execute the batch.

Instructions

Envía un lote de facturas (máximo 10.000 registros) al endpoint SOAP SII de la AEAT.

Requiere AEAT_ENV, AEAT_CERTIFICATE_PATH y AEAT_CERTIFICATE_PASSWORD (MTLS).

HUMAN-IN-THE-LOOP: llame sin confirmation_token para recibir un resumen de confirmación y un token; muéstrelo al usuario y vuelva a llamar con confirmation_token para ejecutar el envío real.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordsYesLista de SOAP envelopes XML de es__build_sii_invoice_record.
fiscal_yearYesEjercicio fiscal (YYYY).
record_typeYes'issued' o 'received'.
confirmation_tokenNoToken de la respuesta awaiting_confirmation previa.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / confirmation_token
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Token de la respuesta awaiting_confirmation previa."
      +}
    • addedInput schema / properties / record_type / description
      Added value: +"'issued' o 'received'."
    • 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

A4.4/5.0
Behavior4/5

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

The description discloses key behavioral traits: the batch size limit (10,000 records), the requirement for MTLS certificates, and the two-phase confirmation mechanism. It also implies the tool is a write/submission operation. However, there are no annotations to contradict or complement, and the description does not mention what happens on failure, retries, or the exact structure of the awaiting_confirmation response. Still, the disclosed behaviors go well beyond a minimal description.

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 compact and well-structured: a one-sentence purpose, a one-line prerequisite, and a clear human-in-the-loop instruction. Every sentence earns its place, and the most important operational detail (the two-step confirmation) is highlighted. No fluff or repetition.

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?

The description covers the essential operational context: prerequisites, batch limit, and the confirmation flow. The output schema exists, so return values are presumably documented there. The main gap is that it doesn't mention error handling or what happens if the token is invalid/expired, but for a submission tool with a clear two-step flow, this is adequate. Slightly more detail on failure modes would make it complete.

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 records (SOAP envelopes from es__build_sii_invoice_record) and confirmation_token (from a previous awaiting_confirmation response), which is helpful. However, it does not add much detail about fiscal_year or record_type beyond what the schema already says. Baseline 3 is appropriate.

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 clearly states the tool's function: sending a batch of invoices (max 10,000 records) to the AEAT SII SOAP endpoint. It names the specific resource (SOAP SII endpoint of AEAT) and the verb (submit/send), and the batch limit adds precision. It is distinguishable from siblings like es__submit_verifactu_to_aeat and es__submit_to_face because it explicitly targets the SII SOAP endpoint.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it lists required environment variables (AEAT_ENV, AEAT_CERTIFICATE_PATH, AEAT_CERTIFICATE_PASSWORD) and clearly explains the human-in-the-loop two-step flow: call without confirmation_token to get a summary and token, show it to the user, then call again with confirmation_token to execute. This is strong, actionable guidance that an agent can follow without ambiguity.

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