Skip to main content
Glama

Facturama: Create credit note

facturama_create_credit_note

Facturama: Issue and stamp a credit note (CFDI de egreso) against one invoice. Issues a CFDI de egreso related to the invoice you name, for a return, a discount or a bonus, and stamps it with the SAT. Returns its invoice_id, series, folio, UUID and totals. The credit is final once the call succeeds. It does not email the note: use email_invoice for that. By default you confirm each call; you can switch that off for this tool. Reaches other people: confirm with the user before each call. Needs the user's Cotlet API key with access to this app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesCredited lines. Each has description, quantity, unit_price and tax_rate.
seriesNoSeries of the credit note. Default: your default series.
invoice_idYesThe invoice the credit note corrects, from list_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare the generic write/open-world profile; the description adds the behavior that actually matters: stamping with the SAT makes the credit final and irreversible, it does not email the note, it reaches third parties so user confirmation is required, and it needs a Cotlet API key with app access. This is real context beyond the structured fields.

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 with the core action and scoping, followed by outcome, constraints and auth. Slightly redundant between the first sentence ("Issue and stamp a credit note") and the second ("Issues a CFDI de egreso ... and stamps it with the SAT"), but no sentence is wasted.

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 a mutation tool with no output schema, the description supplies the return fields (invoice_id, series, folio, UUID, totals), irreversibility, the excluded email step, confirmation policy and auth requirement. Only edge behavior such as failure handling or duplicate-credit prevention is unaddressed, a minor gap rather than a blocker.

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 description coverage is 100% and all three parameters are documented there, including the default series and the items line composition. The description only restates that the credit is issued against the invoice you name, adding no syntax or format detail beyond the schema, so the baseline of 3 applies.

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 (issue/stamp a credit note, CFDI de egreso) tied to exactly one named invoice, and clarifies the scope is a correction of that invoice rather than a new sale. An agent can distinguish it from facturama_create_invoice or facturama_cancel_invoice without opening a schema.

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?

Gives the selecting conditions (return, discount or bonus) and explicitly routes the email step to email_invoice instead. It does not address the other plausible alternative in its sibling set, cancelling the invoice, so the exclusion set is incomplete but the positive guidance is clear.

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