Skip to main content
Glama
mcp-server-billy

mcp-server-billy

Delete draft invoice (Billy)

billy_delete_draft_invoice
DestructiveIdempotent

Deletes a draft invoice that has never been approved or sent, and refuses deletion for any invoice already approved or sent.

Instructions

Delete a draft invoice that was never approved or sent. Reads it first and refuses unless it is a draft with no approval and sent state unsent. An approved invoice can never be deleted here; it is credited in Billy. Off unless writes are enabled (BILLY_ENABLE_WRITES, or the gateway host policy enableWrites).

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": {
      "invoiceId": "<invoiceId>"
    },
    "name": "billy_delete_draft_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceIdYesThe id of the draft invoice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint, idempotentHint and non-read-only, so the safety profile is known; the description still adds substantial behavior beyond them. It discloses that the tool reads the record first, refuses deletion unless preconditions hold, and is gated off unless writes are enabled in config or host policy — exactly the kind of auth/precondition context annotations cannot express.

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, front-loaded with the action and the eligibility rule before the fallback and the enablement gate. Every sentence carries distinct information — precondition, exclusion, configuration — with no repetition of the title or schema.

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 one-parameter destructive tool with no output schema, the description covers eligibility, the read-then-refuse guard, the alternative path for approved invoices, and the write-enablement gate. The remaining minor gap is that it does not say what a successful call returns or whether the deletion is soft or hard, but nothing essential for calling it correctly is missing.

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?

There is a single required parameter with 100% schema description coverage, so the schema already documents invoiceId and its pattern. The description only implies a constraint on what that id may reference (a draft with no approval), adding marginal meaning beyond the schema; baseline 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?

States a specific verb and resource ('Delete a draft invoice') and immediately narrows the scope to drafts that were 'never approved or sent'. It also contrasts the outcome with an approved invoice, which is 'credited in Billy', so an agent can tell this apart from sibling tools like billy_approve_invoice or billy_create_draft_invoice without opening their schemas.

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?

Gives explicit when-to-use (draft, no approval, sent state unsent) and a clear when-not ('An approved invoice can never be deleted here; it is credited in Billy'), effectively routing the agent to a different flow. It also states the environmental prerequisite that writes must be enabled via BILLY_ENABLE_WRITES or host policy enableWrites.

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