Skip to main content
Glama

Delete invoice (draft)

delete_invoice
Destructive

Soft-delete a Draft invoice. Irreversible from the user's view. Call with confirm:true to actually delete; without it, returns a preview of what would be deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to delete. Omit/false to preview only.
invoice_idYesThe Draft invoice UUID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDeleted invoice UUID (after confirm:true).
noteNoNext-step guidance, present on preview responses.
previewNoTrue when the call was a preview (confirm omitted or false): nothing was changed.
would_deleteNoInvoice that would be deleted (preview only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / invoice_id / description
      Added value: +"The Draft invoice UUID."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "id": {
      +      "description": "Deleted invoice UUID (after confirm:true).",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "Next-step guidance, present on preview responses.",
      +      "type": "string"
      +    },
      +    "preview": {
      +      "description": "True when the call was a preview (confirm omitted or false): nothing was changed.",
      +      "type": "boolean"
      +    },
      +    "would_delete": {
      +      "additionalProperties": false,
      +      "description": "Invoice that would be deleted (preview only).",
      +      "properties": {
      +        "gross_total": {
      +          "description": "Total incl. VAT, in the document currency.",
      +          "type": "number"
      +        },
      +        "id": {
      +          "description": "Document UUID.",
      +          "type": "string"
      +        },
      +        "invoice_number": {
      +          "description": "Human-readable document number.",
      +          "type": "string"
      +        },
      +        "status": {
      +          "description": "Document status: Draft, Sent, Paid, Overdue, Cancelled, Rectified, Accepted, Rejected or Expired.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "invoice_number",
      +        "status",
      +        "gross_total"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description reveals that the operation is 'Irreversible from the user's view' and details the confirmation step, providing additional transparency about the side effects and safety mechanism.

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?

The description is compact, using two sentences to convey the primary action, the specific condition (Draft), and the confirm behavior. It is well-structured and free of unnecessary detail.

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?

The description gives sufficient context for the operation, including the preview behavior and irreversibility. It does not mention what happens for non-Draft invoices, but that is not essential for completing the task, and the output schema provides return information.

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?

Both parameters (invoice_id and confirm) have complete descriptions in the schema, covering their meanings and usage. The tool description does not add extra semantic detail beyond what is already provided in the schema, so the baseline score of 3 is appropriate.

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 clearly states it soft-deletes a Draft invoice, specifying the exact verb and resource. This distinguishes it from sibling tools like cancel_invoice or delete_invoice_item, and the condition 'Draft' further narrows its scope.

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?

It explicitly mentions the condition 'Draft' and explains the preview vs. actual delete behavior via the confirm flag. While it doesn't directly compare to alternatives like cancel_invoice, the condition and behavior are sufficient for an agent to decide when to use this tool.

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.