Skip to main content
Glama
Frihet-io

Frihet MCP Server

by Frihet-io

Create Credit Note

create_credit_note

Create a compliant credit note to reverse all or part of an invoice. Generates Spanish VeriFactu rectificativas or standard credit notes with negative amounts.

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
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
invoiceIdYesID of the original invoice to credit / ID de la factura original a rectificar
issueDateNoISO date for the credit note (YYYY-MM-DD). Defaults to today. / Fecha de emision (YYYY-MM-DD). Por defecto hoy.
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
reasonDescriptionNoOptional free-text description of the reason / Descripcion libre del motivo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaNo
successNo
creditNoteNo
Behavior4/5

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

Annotations are minimal (readOnlyHint=false, destructiveHint=false, etc.). The description adds behavioral context: it performs a write operation that reverts an invoice, and in the Spanish market it generates VeriFactu-compliant R1-R5 rectificativa. This goes beyond the annotations by specifying compliance details and the effect on the invoice.

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 concise, with the first sentence front-loading the main action. It includes a bilingual paragraph for Spanish users, which is slightly redundant but serves a clear audience need. No wasted sentences, but length could be reduced for English-only contexts.

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 the core functionality and market differences, which is adequategiven the presence of an output schema and parameter descriptions. Missing are prerequisites (e.g., invoice must exist and not be fully credited) and error conditions, but these are not critical for initial selection. Overall complete enough for an agent to understand the tool's role.

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%, with each parameter already having bilingual descriptions in the input schema. The tool description itself does not add additional semantics for parameters. Per guidelines, when schema_coverage is high, baseline is 3, which is appropriate here.

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?

Description clearly states it creates a credit note (factura rectificativa) for an existing invoice, specifying it reverses all or part of an invoice for compliance. It distinguishes the tool from siblings like create_invoice and refund_sale by mentioning market-specific behavior (VeriFactu in Spain, standard negative amounts elsewhere), making its purpose unmistakable.

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?

Description explains when to use the tool: to generate a credit note for an existing invoice. It provides context about market-specific compliance requirements but does not explicitly state when not to use it or name alternatives. However, the context is sufficient for an agent to decide based on the invoice and market.

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