Skip to main content
Glama

Rechnung erstellen

finalize_invoice
DestructiveIdempotent

Turn a previewed draft into the real invoice. Only call it after the user has seen the preview and explicitly said yes. Without a facturo account it returns a link to the final PDF (no watermark, the user's own invoice_number from the draft); nothing is stored for the user, they download and keep the PDF. With a connected account it allocates the number to the Entwurf the preview made. review_hash comes from the last preview_invoice result; a stale hash is refused. Fails with the missing fields when something mandatory is missing. Calling it again for the same draft returns the invoice already created. While the account has no invoice yet but this chat holds anonymous ones not imported, it answers import_first instead: call import_invoices, or repeat with skip_import=true if the user declined.

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

Input Schema

NameRequiredDescriptionDefault
draft_idYes
review_hashYesreview_hash of the preview the user confirmed
skip_importNoCreate the invoice although anonymous invoices from this chat are not imported yet. Only after the user declined the import.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description adds substantial context beyond them: the anonymous-account path returns a PDF link with nothing stored, the connected-account path allocates a number to the Entwurf, stale review_hash is refused, missing mandatory fields cause failure, and re-calling returns the already-created invoice. It also discloses the import_first response branch, which no annotation conveys.

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?

Front-loaded with the core action and the confirmation precondition, then branches by account state. Dense but every sentence carries behavioral information; the long final sentence about import_first is slightly heavy but earns its place.

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?

With no output schema, the description still explains return values (PDF link, import_first response, existing invoice on repeat) and failure modes. For a destructive, stateful finalization tool this is complete enough to call correctly.

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 67%, and the description compensates by explaining that review_hash comes from the last preview_invoice result and that a stale hash is refused, plus the exact condition for skip_import. draft_id is left implicit, which is the only minor gap.

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 ('Turn a previewed draft into the real invoice') and implicitly contrasts with preview_invoice, which produces the draft. An agent can distinguish it from siblings like preview_invoice or discard_draft without opening any schema.

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 an explicit precondition ('Only call it after the user has seen the preview and explicitly said yes') and names the alternative path: call import_invoices, or repeat with skip_import=true if the user declined. When-to-use, when-not, and alternatives are all covered.

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