Skip to main content
Glama

delete_invoice

DestructiveIdempotent

Permanently delete an invoice. IRREVERSIBLE — NEVER call without explicit user confirmation for this specific invoice. Deleting is NOT the same as cancelling: to keep the invoice as history, use update_invoice with status "cancelled" instead, and offer that alternative to the user first. Money survives: wallet transactions and Sweeppea commissions from a paid invoice are NEVER deleted. Requires the Invoices module enabled — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support.

delete_invoice

When to use

Permanently delete an invoice. IRREVERSIBLE — NEVER call without explicit user confirmation for this specific invoice. Deleting is NOT the same as cancelling: to keep the invoice as history, use update_invoice with status "cancelled" instead, and offer that alternative to the user first. Money survives: wallet transactions and Sweeppea commissions from a paid invoice are NEVER deleted. Requires the Invoices module enabled — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support.

Pre-calls required

  1. get_invoice — confirm which invoice is being deleted and show the user its InvoiceNumber and status

Parameters to validate before calling

  • invoice_token (string, required) — The invoice token (UUID v4) of the invoice to delete

Notes

  • DESTRUCTIVE — IRREVERSIBLE. Always confirm with the user before calling. Explain what will be lost.

  • NOT the same as cancelling — offer update_invoice with status "cancelled" first (keeps the invoice as history)

  • Wallet transactions and Sweeppea commissions from a paid invoice are NEVER deleted

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be true. Set it ONLY after the user explicitly confirmed THIS deletion in this conversation, having been told what is lost: the invoice and its history (cancelling with update_invoice keeps it). Never assume, never carry a confirmation over from a previous item, never set it to satisfy the schema.
invoice_tokenYesThe invoice token (UUID v4) of the invoice to delete

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Must be true. Set it ONLY after the user explicitly confirmed THIS deletion in this conversation, having been told what is lost: the invoice and its history (cancelling with update_invoice keeps it). Never assume, never carry a confirmation over from a previous item, never set it to satisfy the schema.",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "invoice_token"
      -]New value: +[
      +  "invoice_token",
      +  "confirm"
      +]
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true, but the description adds substantial behavioral context: irreversibility, the need for explicit confirmation, that wallet transactions and commissions survive deletion, and the module-enabled prerequisite. There is no contradiction with 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 description is well front-loaded with the most critical warning, but it is repetitive: the opening paragraph is duplicated almost verbatim under the '# delete_invoice' heading, and the Notes section repeats the same points again. The structure is clear, but several sentences do not earn their place.

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?

For a destructive mutation with no output schema, the description covers the prerequisite call, alternative behavior, irreversibility, error handling, and parameter validation guidance. An agent has enough context to decide whether and how to invoke this tool correctly.

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%, so the schema fully documents invoice_token and confirm. The description adds pre-call context and confirmation requirements, but it largely repeats the schema's parameter meanings rather than adding new semantics.

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?

The description opens with a specific verb and resource: 'Permanently delete an invoice.' It clearly distinguishes deleting from cancelling by naming update_invoice with status 'cancelled' as the alternative, so an agent can differentiate it from related invoice operations.

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?

The description gives explicit when-to-use and when-not-to-use guidance: never call without explicit user confirmation, offer update_invoice to keep the invoice as history, require get_invoice as a pre-call, and handle the 403 'module is not enabled' error by not retrying and contacting support.

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