Skip to main content
Glama
verifactu-mcp

verifactu-mcp

Generate VeriFactu QR code

generate_verifactu_qr
Read-onlyIdempotent

Creates the AEAT tax QR URL and image for VERI*FACTU invoices, converting NIF, invoice details and total into a printable QR for validation.

Instructions

Generate the AEAT tax QR ("QR tributario") of an invoice: URL and image.

Args: nif: Issuer NIF. numserie: Invoice series + number exactly as registered. fecha: Issue date (DD-MM-AAAA; AAAA-MM-DD and DD/MM/AAAA are converted). importe: ImporteTotal with decimal point, e.g. "241.40". verifactu: true for VERI*FACTU systems (ValidarQR), false for non-verifiable systems (ValidarQRNoVerifactu). environment: produccion (default) or pruebas (AEAT test portal). size_px: Image width in pixels (100-2000). image_format: png (default) or svg. The image uses error correction level M. print_rules says how it must appear on the invoice.

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": {
      "nif": "<nif>",
      "numserie": "<numserie>",
      "fecha": "<fecha>",
      "importe": "<importe>"
    },
    "name": "generate_verifactu_qr"
  }
}

Input Schema

NameRequiredDescriptionDefault
nifYes
fechaYes
importeYes
size_pxNo
numserieYes
verifactuNo
environmentNoproduccion
image_formatNopng

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, closed-world), so the description adds real value beyond them: error correction level M, that a separate `print_rules` field governs legal presentation on the invoice, and that favorable environments map to real AEAT endpoints. It does not state whether generation is purely local or performs any AEAT call, which would have completed the picture.

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?

Front-loaded purpose sentence followed by a dense per-argument list; almost no waste. The closing note about `print_rules` is somewhat orphaned since it is not a parameter, but it is short and informative rather than filler.

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?

For an 8-parameter tool with no enums and zero schema descriptions, the prose compensates thoroughly, and the existence of an output schema relieves it of explaining return values. The only residual gap is the absence of any cross-tool routing or precondition statement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does: nif is the issuer NIF, numserie must match the registered series+number exactly, fecha accepts DD-MM-AAAA with AAAA-MM-DD and DD/MM/AAAA converted, importe needs a decimal point (with example "241.40"), size_px is bounded 100-2000, and image_format/environment/verifactu defaults are restated. All eight parameters gain meaning not present in the bare schema.

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?

States a specific verb and resource — generate the AEAT 'QR tributario' of an invoice — and names both outputs (URL and image). An agent can distinguish this from siblings such as check_qr_url or validate_verifactu_xml without opening any schema.

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 explains the conditional choices an agent faces once committed to the tool (verifactu true/false selects ValidarQR vs ValidarQRNoVerifactu, environment selects producción vs pruebas), which is useful routing inside the tool. However it never states when to call this versus alternatives like check_qr_url, nor any prerequisites (e.g., invoice must already be registered).

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