Skip to main content
Glama

create-credit-note

Create a draft credit note for the whole of an issued sales invoice (any status except draft). It is how an invoice is reversed, since issued invoices can't be deleted. Returns creditNote with its id, status draft, no number or issue date yet, and an invoice summary. Fails if the invoice already has a credit note that isn't cancelled. Nothing is applied until submit-credit-note; check it with get-credit-note. To reissue a corrected invoice, copy it with duplicate-invoice. Requires the invoice:write scope.

Input Schema

NameRequiredDescriptionDefault
companyIdYesID of the company that owns the invoice, as returned by list-companies
invoiceIdYesID of the issued invoice to credit, as returned by list-invoices

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / companyId / description
      Previous value: -"Company ID"New value: +"ID of the company that owns the invoice, as returned by list-companies"
    • changedInput schema / properties / invoiceId / description
      Previous value: -"Invoice ID"New value: +"ID of the issued invoice to credit, as returned by list-invoices"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare the safe-write profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false); the description goes well beyond them by explaining the two-phase lifecycle (draft now, nothing applied until submit-credit-note), the exact failure precondition, and the required invoice:write scope. This is exactly the context an agent needs before committing a financial reversal.

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?

Six short sentences, front-loaded with the action and scope, then failure mode, then the lifecycle and alternatives. Every sentence adds a distinct operational fact; none is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even without an output schema, the description documents the return value ('creditNote with its id, status draft, no number or issue date yet, and an invoice summary') and the required follow-up step. Nothing an agent needs in order to call this correctly is missing.

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% and both params point to their discovery tools (list-companies, list-invoices), so the schema carries the load. The description still adds real semantics by stating the credit note covers 'the whole of' the invoice, telling the agent there is no partial-amount parameter or option.

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 ('Create a draft credit note') plus scope ('for the whole of an issued sales invoice, any status except draft'). This immediately separates it from submit-credit-note, get-credit-note, and duplicate-invoice without needing to open 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use it ('It is how an invoice is reversed, since issued invoices can't be deleted'), what blocks it ('Fails if the invoice already has a credit note that isn't cancelled'), and which siblings handle adjacent jobs ('Nothing is applied until submit-credit-note; check it with get-credit-note... copy it with duplicate-invoice').

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