Skip to main content
Glama

Factuur definitief maken

finalize_invoice
Destructive

Turn an owner-approved draft into a final invoice with the next consecutive number, PDF, and btw/profit totals; reverse only with credit_invoice.

Instructions

Turn a draft into a final invoice: it gets the next consecutive number, a PDF, and counts for btw and profit. This cannot be undone, only reversed with credit_invoice. Only call after the owner approved the draft.

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": {
      "draft_id": "<draft_id>"
    },
    "name": "finalize_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
draft_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description goes well beyond that: it names the irreversibility, the sole recovery mechanism (credit_invoice), and the downstream accounting consequences (numbering sequence, btw, profit). This is exactly the extra context an agent needs before committing a destructive action.

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?

Two dense sentences, front-loaded with the effect and followed by the irreversibility warning and precondition. No filler, and the danger signal is placed where it will be read.

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 one-parameter mutation with no output schema, the description covers consequences, irreversibility, and preconditions well. The remaining gap is that it never says what comes back (invoice ID, PDF reference) or where draft_id originates, both of which the agent must guess.

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 at 0% schema description coverage, and the description only implicitly identifies it by framing the input as 'a draft'. It never states that draft_id is an integer identifier or how to obtain one, so it only partially compensates for the empty schema.

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 (finalize/turn draft into final) and resource, plus the concrete side effects: next consecutive number, PDF generation, and inclusion in btw and profit figures. An agent can distinguish this from create_invoice or send_invoice purely from this sentence.

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 an explicit precondition ('Only call after the owner approved the draft') and names the reversal path (credit_invoice), which is the correct follow-up for an erroneous finalization. It doesn't clarify the relationship to send_invoice (whether finalizing also sends), but the when-to-use condition itself is unambiguous.

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