Skip to main content
Glama

cancel_sales_invoice

Marks a sales invoice as cancelled by ID without deleting the record, preserving accounting history. Use it to void invoices while keeping audit trails intact.

Instructions

Cancel a sales invoice (HTTP DELETE on /cancel — does not delete the record, marks it cancelled).

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": {
      "id": "<id>"
    },
    "name": "cancel_sales_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesSales invoice ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does valuable work by stating that the operation does not delete the record but marks it cancelled, which prevents a serious misunderstanding of a destructive-sounding verb. However, it omits whether cancellation is reversible, what happens to related records or accounting entries, and what errors occur if the invoice is already cancelled.

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?

One sentence with the operation front-loaded and the critical non-obvious detail (soft cancel, not a delete) placed immediately after in parentheses. No filler, no restatement of the title.

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?

For a one-parameter tool with no annotations and no output schema, the definition covers the essential semantics of the action. What is missing is the state-transition context an agent needs to act safely: whether the invoice can be recovered afterward, what happens to downstream documents, and how the call behaves on an already-cancelled invoice.

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?

There is a single required parameter, and the schema already documents it at 100% coverage ("Sales invoice ID"). The description adds no format, source, or lookup guidance beyond what the schema provides. A baseline 3 is appropriate when the schema fully covers the only parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Cancel a sales invoice"), so the agent knows exactly what operation it performs. It also clarifies that cancellation is a status change rather than a deletion. It stops short of differentiating itself from siblings like archive_sales_invoice or recover_sales_invoice, which occupy adjacent semantic space.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use guidance: the description never says when an agent should cancel versus archive, recover, or update an invoice, even though those siblings exist. Usage is only inferable from the tool name. No prerequisites, no exclusions, no alternatives are named.

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