Skip to main content
Glama

Correct and resend Veri*factu record (subsanación)

resubmit_invoice_aeat
Destructive

For an invoice whose Verifactu record the AEAT rejected or accepted with errors: sends a new correction record (Alta de subsanación, new link in the Verifactu chain) with the customer's CURRENT data. The invoice itself (number, date, amounts) does not change, so first fix what the AEAT flagged on the customer (update_customer), then call this. Per AEAT rules a subsanación is not possible when the cause requires a corrective invoice (rectify_invoice). Ask the user for explicit confirmation, then call with confirm=true. Returns the AEAT response status and message for the new subsanación record.

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true. Only after the user explicitly confirmed.
invoice_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare non-read-only and destructive behavior, and the description adds important context: a new Veri*factu chain link is created, invoice data itself does not change, customer data must be fixed first, confirmation is mandatory, and the AEAT response is returned. It does not fully spell out the fate of the prior rejected record or broader irreversibility, so it is strong but not exhaustive.

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 front-loaded with the triggering condition, then workflow, exception, confirmation, and return value. Every sentence adds useful information and there is no 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?

Given the destructive annotation and lack of an output schema, the description covers prerequisites, alternatives, confirmation, side effects, and return value well. The main remaining gap is the undocumented invoice_id parameter, which is only contextually implied.

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?

The invoice_id parameter has no schema description, and the description only implies it through 'For an invoice whose Veri*factu record...' without naming or constraining the parameter. The confirm parameter is fully described in the schema, and the description largely repeats that requirement rather than adding new parameter-level semantics.

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 names a specific action (sends a new correction record / Alta de subsanación) and resource (the rejected or error-accepted Veri*factu record), and explicitly distinguishes it from update_customer and rectify_invoice. An agent can identify the operation without opening the schema.

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?

It states exactly when to use it: when AEAT rejected or accepted with errors, after fixing customer data via update_customer. It also states when not to use it: when the cause requires a corrective invoice, directing the agent to rectify_invoice. Confirmation requirements are explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources