Skip to main content
Glama

Octobooks

Draft a credit note

credit_note_draft

Prepare a credit note for an issued invoice (by id or number): the way an issued invoice is corrected. Without lines it credits the whole invoice; with lines (as on an invoice) a part. It may credit a paid invoice: what it gives back beyond what is due is the customer's credit (to allocate or refund). Without invoice, with customer (a code) and lines: a credit note of its own, the customer's credit (a German company prints it as Gutschrift). reason says why and is printed. It is a draft: it is issued like an invoice. A whole invoice is cancelled by voiding it. Nothing in the books changes here.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "reason": "<reason>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "credit_note_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesNo
notesNo
reasonYes
companyNo
invoiceNo
customerNo
issue_dateNo
idempotency_keyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare the mutation/safety profile; the description adds substantial context beyond them — that the result is a draft that must later be issued, that crediting a paid invoice produces a customer credit available to allocate or refund, and that no ledger entries change. It does not cover permissions, what happens on failure, or how the draft is later issued. The required idempotency_key sits in mild tension with idempotentHint=false, but the description itself does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The main case is front-loaded and nearly every clause carries information, but the prose is telegraphic and run-on ("reason says why and is printed"), and the standalone-credit-note variant is buried mid-paragraph rather than signposted. It reads as notes rather than structured guidance.

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 non-destructive mutation tool with an output schema, the description covers the essential behavioral facts: what is created, that it is a draft, and that the books are untouched. The remaining gap is the four undocumented parameters, which is significant given 8 parameters at 0% schema coverage but secondary to understanding what the tool does.

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 0%, so the description must carry all parameter meaning, and it only partially does. It explains invoice (id or number), lines (same shape as on an invoice), customer (a code) and reason (why, and that it is printed), but leaves notes, company, issue_date and idempotency_key entirely undefined in both schema and prose.

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 ("Prepare a credit note for an issued invoice") and immediately frames it as the correction mechanism for an issued invoice, which distinguishes it from invoice_draft. It also explicitly carves out voiding as the path for cancelling a whole invoice, so the agent can tell the two apart 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 concrete selection rules: invoice + no lines = full credit, invoice + lines = partial credit, customer + lines without invoice = standalone credit note. It also implies a when-not case by directing whole-invoice cancellation to voiding. It stops short of naming the voiding sibling or stating prerequisites such as invoice status requirements.

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