Skip to main content
Glama

Delete invoice

delete_invoice
DestructiveIdempotent

Permanently delete the last invoice in a series to free its number. Irreversible—no restore. Use cancel_invoice for earlier invoices.

Instructions

Permanently remove an invoice, freeing its number for reuse. Irreversible — there is no restore.

SmartBill only allows this for the LAST invoice in a series and rejects it for any earlier one. For those, use cancel_invoice to void it or create_reverse_invoice to storno it.

Destroys a fiscal document: ask the user to confirm explicitly, and prefer cancel_invoice when unsure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesInvoice number, without the series prefix.
seriesNameNoInvoice series. Falls back to the configured default.
companyVatCodeNoIssuing company CIF. Falls back to SMARTBILL_VAT_CODE.
Behavior4/5

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

Description adds value beyond annotations by noting irreversibility ('no restore') and warning about fiscal document destruction. Annotations already declare destructiveHint=true and idempotentHint=true; the description supplements but does not contradict. Idempotency is not explained, but overall transparency is strong.

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 three concise paragraphs: main action, usage constraints with alternatives, and a final warning. Every sentence provides essential information without redundancy, well front-loaded.

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 financial tool with constraints, the description covers the core action, conditions, alternatives, and user confirmation requirement. No output schema exists, but the explanation suffices for an agent to decide and invoke 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?

All parameters are described in the schema (100% coverage), so the description's role is limited. It mentions 'invoice number' without series prefix, which matches the schema. No additional semantic value beyond what the schema provides, earning a baseline score of 3.

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 states 'Permanently remove an invoice, freeing its number for reuse.' This provides a specific verb-resource pair and distinguishes itself from siblings like cancel_invoice and create_reverse_invoice by highlighting the effect of number reuse.

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 states the condition for use ('only for the LAST invoice in a series') and provides alternatives ('cancel_invoice' and 'create_reverse_invoice') with clear instructions for uncertain cases, fulfilling explicit when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bogdanripa/smartbill-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server