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
invoice_tokenYesThe invoice token (UUID v4) of the invoice to delete

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark destructiveHint, but the description adds crucial specifics: irreversibility, requirement for explicit user confirmation, that wallet transactions/commissions persist, and that the Invoices module must be enabled. This goes well beyond the annotation's binary flags.

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 thorough but duplicates its opening warning verbatim in the 'When to use' section, making it longer than necessary. The organized structure with headers helps, but the redundancy prevents a higher score.

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?

The description covers not only the action but also prerequisites, alternative behavior, side effects on financial records, and module-related error handling. This makes it fully actionable for an agent, despite lacking an output schema.

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 covers 100% of the single parameter (invoice_token). The description repeats the schema's own description without adding new semantics, so it does not raise the baseline; it merely restates the UUID v4 format.

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 'Permanently delete an invoice', clearly stating the action and target. It also distinguishes from cancellation via update_invoice, which is crucial because the tool's name alone could be confused with a softer action.

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 tells when to use and when not: 'Deleting is NOT the same as cancelling' and directs to update_invoice with status 'cancelled'. It also mandates the pre-call get_invoice and warns against retrying on 403, giving clear decision rules.

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.

TDQS

A3.6/5.0
Disambiguation4/5

Most tools follow a clear resource+action pattern (fetch_* for lists, get_* for single items, create/update/delete for writes), making them distinguishable. A few near-overlaps exist (fetch_billing_transactions vs fetch_wallet_transactions, draw_winners vs schedule_drawing) but the descriptions clarify the boundaries.

Naming Consistency4/5

Tool names consistently use snake_case verb_noun, with fetch_ for list operations and get_ for single-item retrieval. Some verb variation (add_participant, count_participants, draw_winners, schedule_drawing) deviates from the dominant create/fetch/update/delete pattern but remains predictable and readable.

Tool Count1/5

With 83 tools, this is far beyond a well-scoped server (typically 3-15, with 25+ considered too many). Even though the platform has broad functionality, the sheer number of tools creates significant agent confusion and selection overhead.

Completeness4/5

The sweepstakes domain is thoroughly covered: lifecycle management, participants, groups, rules, drawings, winners, calendar, notes, todos, tickets, surveys, invoices, billing, files, and entry settings. A few minor gaps exist (e.g., no general participant field update, no archive action) but the surface is remarkably complete for its scope.

Resources