Skip to main content
Glama

Prepare deleting a draft or proforma

prepare_delete_invoice_draft

Checks that an invoice draft, or a proforma not converted to an invoice (open, expired or cancelled), can be deleted and returns a summary of the deletion for the user's confirmation: the type, status, number and date, the customer, the gross total, the number of items and the effect of deleting (it can't be undone; the number of a deleted proforma can be given to the next proforma), with a one-time confirmation token valid for 10 minutes. Issued, cancelled and corrective invoices and converted proformas can't be deleted. No data of the company or its documents is changed.

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>"
    },
    "name": "prepare_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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Adds substantial context beyond the annotations: what the returned summary contains (type, status, number, date, customer, gross total, item count), the irreversibility of deletion, the proforma number-reuse rule, and the 10-minute token TTL. Annotations already declare destructiveHint=false, and the description's 'No data is changed' reinforces the safety profile rather than contradicting it. The only residual tension is readOnlyHint=false against a statement that nothing changes, which reads as a conservative annotation for the issued token rather than an actual conflict.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded in the opening clause and every clause carries substantive information with no filler. However, it is delivered as a single very long run-on sentence whose embedded list of returned fields and deletion effects would read far better as separate sentences or bullets.

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?

With no output schema, the description admirably enumerates the fields the confirmation summary returns, plus deletion side effects and token lifetime, which is what an agent needs to relay to a user. The one missing piece for a 'prepare_' tool is an explicit pointer to the companion deletion call that consumes the token.

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 coverage is 100% and both parameters already document their provenance (list_companies, list_invoices), so the schema does the heavy lifting. The description adds constraint semantics by saying which invoice states are eligible for invoice_id, but offers no additional syntax or format detail.

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?

States a specific verb and resource ('Checks that an invoice draft, or a proforma not converted to an invoice ... can be deleted') and immediately scopes which document types qualify. The closing line 'No data of the company or its documents is changed' separates this preparatory check from the sibling delete_invoice_draft, so an agent can tell the two apart without opening either schema.

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?

Gives clear inclusion and exclusion rules: issued, cancelled and corrective invoices and converted proformas can't be deleted, while open/expired/cancelled proformas and drafts can. It also implies the follow-up step via the 'one-time confirmation token valid for 10 minutes', but never explicitly names delete_invoice_draft as the next call, leaving the workflow connection to inference.

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