Skip to main content
Glama
Frihet-io

Frihet MCP Server

Create Credit Note

create_credit_note

Generate a credit note to reverse an existing invoice: creates VeriFactu-compliant rectificativas for Spain or standard credit notes with negative amounts for other markets.

Instructions

Create a credit note (factura rectificativa) for an existing invoice. This reverses all or part of an invoice for compliance. Spanish market: generates VeriFactu-compliant R1-R5 rectificativa. Other markets: standard credit note with negative amounts. / Crea una factura rectificativa para una factura existente. Mercado espanol: genera rectificativa R1-R5 conforme a VeriFactu. Otros mercados: nota de credito estandar con importes negativos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceIdYesID of the original invoice to credit / ID de la factura original a rectificar
reasonYesReason for the credit note. Maps to Spanish R-types: error→R1 (art. 80.1), refund/discount/cancellation/other→R4 / Motivo de la rectificacion. error→R1, resto→R4
reasonDescriptionNoOptional free-text description of the reason / Descripcion libre del motivo
fullCreditNotrue = full credit (tipo S, sustitucion), false = partial (tipo I, diferencias). Default: true / true = abono total (tipo S), false = parcial (tipo I). Por defecto: true
issueDateNoISO date for the credit note (YYYY-MM-DD). Defaults to today. / Fecha de emision (YYYY-MM-DD). Por defecto hoy.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
clientNameYes
itemsYes
issueDateNo
dueDateNo
statusNo
notesNo
taxRateNo
totalNo
createdAtNo
updatedAtNo
Behavior4/5

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

Annotations indicate a write operation (readOnlyHint=false) and non-destructive behavior. The description adds behavioral context: it reverses invoices and generates compliance documents, without contradicting annotations.

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 front-loaded with key information but includes a bilingual repetition that adds length. It is well-structured but could be slightly more concise.

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 purpose, market-specific behavior, and compliance requirements. With an output schema present, not explaining return values is acceptable. It is complete for the tool's complexity.

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

Parameters4/5

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

Schema coverage is 100%, so the description adds value by explaining the purpose of parameters like reason (maps to Spanish R-types) and fullCredit (types S/I). This goes beyond the schema's field descriptions.

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 purpose: creating a credit note (factura rectificativa) for an existing invoice, with specific compliance details for Spanish and other markets. It distinguishes itself from sibling tools like create_invoice by focusing on reversing invoices.

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?

The description explains when to use the tool (reversing invoices) and provides context for reason mapping to Spanish R-types. It lacks explicit when-not-to-use or alternative tools, but the purpose is clear enough for proper selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Frihet-io/frihet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server