Skip to main content
Glama

cancel_invoice

Cancel an invoice that was never sent and is not booked; sent invoices are refused and must be credited instead via credit_invoice.

Instructions

Cancel (makulera) an invoice that was NEVER sent and is not booked. A sent invoice is in the customer's hands, so it is credited instead (credit_invoice); this tool refuses it.

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": {
      "document_number": "<document_number>"
    },
    "name": "cancel_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo
document_numberYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations present, the description carries the burden and does disclose the key guardrail: the tool refuses already-sent invoices, and voiding is tied to unbooked invoices. It stops short of explaining what cancellation does downstream (numbering gaps, reversibility), how failure is surfaced, or what the dry_run flag changes.

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?

Two tight sentences that front-load the precondition before the alternative. The closing clause 'this tool refuses it' is slightly redundant after 'NEVER sent' but usefully signals a hard failure rather than a silent no-op.

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

Completeness3/5

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

The domain logic and sibling routing are well covered, but for a destructive mutation tool with no annotations and no output schema, the definition should say what happens on success/failure and what dry_run does. Those gaps leave the agent guessing on invocation mechanics.

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

Parameters2/5

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

Schema description coverage is 0% for two parameters, and the description supplies no meaning for either. document_number is at least implied by 'an invoice', but dry_run, a non-obvious execution mode, is never mentioned and an agent must infer it from the schema title alone.

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 (cancel/makulera) and resource (invoice) plus the two defining preconditions: never sent and not booked. It is immediately distinguishable from credit_invoice, which the description names as the path for sent invoices.

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 defines when to use this tool (invoice never sent and unbooked) and when not to, routing sent invoices to credit_invoice and noting that this tool will refuse them. The alternative and the condition selecting it are both stated outright.

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