Skip to main content
Glama
cmendezs

mcp-facturacion-electronica-es

Es Query Sii Status

es__query_sii_status

Query the SII tax status of issued or received invoices by fiscal year and settlement period, optionally filtering by issuer NIF and invoice number.

Instructions

Consulta el estado de facturas en el SII mediante ConsultaFactInformadasEmitidas/Recibidas (SOAP).

ES-LC-2: reemplaza el REST GET no funcional por el envelope SOAP correcto. Filtra por ejercicio, periodo y, opcionalmente, por NIF del emisor y numero de factura.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYesPeriodo de liquidacion: '01'..'12' para mensual, o '0A' para anual.
emisor_nifNoNIF del emisor para filtrar (opcional, solo para received).
fiscal_yearYesEjercicio fiscal (YYYY).
nif_titularYesNIF del titular SII (obligado tributario).
record_typeNoTipo de registro: 'issued' (expedidas) o 'received' (recibidas).issued
invoice_numberNoNumSerieFacturaEmisor para filtrar por factura concreta (opcional).
nombre_titularYesNombre o razon social del titular.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / emisor_nif / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / emisor_nif / default
      Added value: +null
    • removedInput schema / properties / emisor_nif / type
      Removed value: -"string"
    • addedInput schema / properties / invoice_number / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / invoice_number / default
      Added value: +null
    • changedInput schema / properties / invoice_number / description
      Previous value: -"NumSerieFacturaEmisor para filtrar por factura concreta (opcional)."New value: +"NumSerieFacturaEmisor para filtrar por factura concreta\n(opcional)."
    • removedInput schema / properties / invoice_number / type
      Removed value: -"string"
    • addedInput schema / properties / record_type / default
      Added value: +"issued"
    • removedInput schema / properties / record_type / enum
      Removed value: -[
      -  "issued",
      -  "received"
      -]
    • changedInput schema / required
      Previous value: -[
      -  "nif_titular",
      -  "nombre_titular",
      -  "fiscal_year",
      -  "period",
      -  "record_type"
      -]New value: +[
      +  "nif_titular",
      +  "nombre_titular",
      +  "fiscal_year",
      +  "period"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. Changed9 schema fields changedv0.2.0
    • removedInput schema / properties / batch_id
      Removed value: -{
      -  "description": "Referencia del lote devuelta por es__submit_sii_batch.",
      -  "type": "string"
      -}
    • addedInput schema / properties / emisor_nif
      Added value: +{
      +  "description": "NIF del emisor para filtrar (opcional, solo para received).",
      +  "type": "string"
      +}
    • addedInput schema / properties / fiscal_year
      Added value: +{
      +  "description": "Ejercicio fiscal (YYYY).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / invoice_number
      Added value: +{
      +  "description": "NumSerieFacturaEmisor para filtrar por factura concreta (opcional).",
      +  "type": "string"
      +}
    • addedInput schema / properties / nif_titular
      Added value: +{
      +  "description": "NIF del titular SII (obligado tributario).",
      +  "type": "string"
      +}
    • addedInput schema / properties / nombre_titular
      Added value: +{
      +  "description": "Nombre o razon social del titular.",
      +  "type": "string"
      +}
    • addedInput schema / properties / period
      Added value: +{
      +  "description": "Periodo de liquidacion: '01'..'12' para mensual, o '0A' para anual.",
      +  "type": "string"
      +}
    • addedInput schema / properties / record_type / description
      Added value: +"Tipo de registro: 'issued' (expedidas) o 'received' (recibidas)."
    • changedInput schema / required
      Previous value: -[
      -  "batch_id",
      -  "record_type"
      -]New value: +[
      +  "nif_titular",
      +  "nombre_titular",
      +  "fiscal_year",
      +  "period",
      +  "record_type"
      +]
  3. First observedv0.0.1

TDQS

B3.2/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 full burden. It conveys a read-only intent via 'Consulta' and names the SOAP envelope method, which is useful. However, it does not disclose authentication requirements, potential side effects, rate limits, or whether results are fetched live or cached.

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 short and front-loaded with the core purpose. The 'ES-LC-2' replacement note is slightly noisy and not essential for invocation, but it does not significantly harm clarity.

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 output schema exists and all parameters are documented, so most invocation details are covered. Still, the description lacks usage alternatives and behavioral caveats, and the historical REST-replacement note is not enough to fully orient an agent in the broader tool landscape.

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 parameters. The description adds a helpful summary of the main filters (ejercicio, periodo, NIF emisor, número de factura), but this largely restates the schema rather than adding substantial new meaning.

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 it consults SII invoice status via specific SOAP operations (ConsultaFactInformadasEmitidas/Recibidas). It is distinct from the sibling Verifactu/Face status tools by explicitly naming the SII context, though it does not explicitly differentiate from those siblings.

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

Usage Guidelines2/5

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

There is no direct guidance on when to use this tool versus sibling status query tools such as es__query_verifactu_status or es__get_face_invoice_status. The 'ES-LC-2' note about replacing a REST GET is historical context, not actionable selection guidance.

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