Skip to main content
Glama

Delete a draft or proforma

delete_invoice_draft
DestructiveIdempotent

Deletes the invoice draft, or the proforma not converted to an invoice, summarised by prepare_delete_invoice_draft once the user has confirmed it, using its confirmation token. Deleting can't be undone; the number of a deleted proforma is free again, and deleting a draft created from a proforma reopens that proforma. Refused, with the token used up, when the token expired or doesn't match, or the document changed after the preparation (e.g. an item added or the proforma converted). A repeated call with the same token returns the same answer without deleting again.

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": {
      "company_id": "<company_id>",
      "invoice_id": "<invoice_id>",
      "confirmation_token": "<confirmation_token>"
    },
    "name": "delete_invoice_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
company_idYesThe id of the company, from list_companies.
invoice_idYesThe id of the invoice draft or proforma, from list_invoices.
confirmation_tokenYesThe confirmation_token of the answer of prepare_delete_invoice_draft for this document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint and idempotentHint, but the description adds real substance beyond them: irreversibility, that a deleted proforma's number is freed, that deleting a draft derived from a proforma reopens that proforma, the token-expiry and staleness refusal conditions, and that a repeated call with the same token is a no-op returning the same answer.

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?

Three sentences, each doing distinct work: what is deleted and the required precondition, the irreversible side effects, then the refusal and idempotency semantics. No filler and the critical constraint (cannot be undone) appears early.

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?

For a destructive, token-gated mutation with no output schema, the description covers preconditions, side effects, failure modes and repeat-call behavior. The only gap is that the shape of the success response is left vague ('the same answer'), which matters slightly given no output schema exists.

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

Parameters4/5

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

Schema coverage is 100%, so the parameters are already documented. The description nonetheless adds lifecycle meaning: the token comes from the preparation answer, is consumed on refusal, and is invalidated by token expiry or document changes, which clarifies why the parameter can fail rather than just what it is.

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?

Specific verb (deletes) plus precisely scoped resource: a draft, or a proforma that has not been converted to an invoice. The scope clause 'or the proforma not converted' distinguishes it cleanly from convert_proforma and from prepare_delete_invoice_draft, which only prepares the operation.

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?

Explicitly states the prerequisite workflow: it must follow prepare_delete_invoice_draft and be called once the user has confirmed, supplying that preparation's token. It also enumerates when the call will be refused. It does not contrast with other deletion/cancellation paths such as cancel_invoice, so a small routing gap remains.

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