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

mcp-facturacion-electronica-es

Es Check B2B Mandate Applicability

es__check_b2b_mandate_applicability

Determines whether Spanish B2B e-invoicing falls under VERI*FACTU or SII using annual turnover, province, and SII enrollment, and flags foral provinces as out of scope.

Instructions

Determina el régimen de facturación electrónica aplicable.

VERI*FACTU o SII, a partir del volumen de operaciones, código de provincia y enrolamiento en SII. Las provincias forales (TicketBAI, NaTicket) se señalan como fuera de alcance. Aplica la lógica de exclusión mutua del Real Decreto 254/2025.

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": {
      "annual_turnover_eur": "<annual_turnover_eur>",
      "tax_address_province_code": "<tax_address_province_code>"
    },
    "name": "es__check_b2b_mandate_applicability"
  }
}

Input Schema

NameRequiredDescriptionDefault
entity_typeNoTipo de obligado: 'IS' (Sociedades) o 'IRPF'.IS
enrolled_in_siiNoInscripción en el SII (por defecto: false).
annual_turnover_eurYesVolumen anual de operaciones IVA en EUR.
tax_address_province_codeYesCódigo de provincia INE de dos dígitos.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / entity_type / default
      Added value: +"IS"
    • removedInput schema / properties / entity_type / enum
      Removed value: -[
      -  "IS",
      -  "IRPF"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. First observedv0.0.1

TDQS

B3.3/5.0
Behavior1/5

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

No annotations are supplied, so the description carries the full burden. It never states whether this is a pure computation (no side effects) or a stateful/registered check, whether it requires credentials or AEAT connectivity, or how ambiguous inputs are resolved. For a compliance-decision tool with zero annotation coverage this is a significant gap, though it does disclose the legal basis (RD 254/2025 mutual-exclusion logic) and the out-of-scope territory.

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?

Four compact, front-loaded sentences: purpose first, then driving inputs, then scope exclusion, then legal basis. Dense but no filler; the only minor redundancy is restating the foral-province exclusion as 'fuera de alcance'.

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?

An output schema exists, so return values need not be explained, and all inputs are documented in the schema. The description supplies the decision logic and scope boundary that structured fields cannot express. The residual gap is behavioral: no statement of side effects, permissions, or determinism.

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 coverage is 100% and every parameter already carries a description, so baseline 3 applies. The description adds the conceptual relationship between turnover/province/enrollment and the resulting regime, but omits 'entity_type', the only parameter whose effect on the outcome is left unexplained.

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?

Uses a specific verb+resource ('Determina el régimen de facturación electrónica aplicable') and names the candidate outputs (VERI*FACTU vs SII), so an agent knows exactly what question the tool answers. It does not, however, distinguish itself from the related sibling 'es__detect_regional_regime', which an agent could plausibly confuse it with.

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?

States the determining inputs (turnover volume, province code, SII enrollment) and gives an explicit exclusion: foral provinces (TicketBAI, NaTicket) are reported as out of scope. It stops short of naming an alternative tool to call for those excluded cases, so routing guidance is partial.

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