Skip to main content
Glama

Issue invoice

issue_invoice
DestructiveIdempotent

Issues the invoice draft summarised by prepare_issue_invoice once the user has confirmed it, using its confirmation token and the same number and date input: the document gets its number and issue date and is locked; it can't be edited any more or go back to a draft. Nothing is sent to the customer or to KSeF. Refused, with the token used up, when the token expired or doesn't match, or the draft changed after the preparation. A repeated call with the same token returns the same answer without issuing again.

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>",
      "confirmation_token": "<confirmation_token>"
    },
    "name": "issue_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoThe issue date, YYYY-MM-DD; today in the time zone of the company when not given. It can't be after that day or before the latest issued document of the series.
numberNoA number other than the usual one to issue the document with; when not given, the document keeps its own number or gets the next number of the series of the company.
company_idYesThe id of the company, from list_companies.
invoice_idYesThe id of the invoice draft, from list_invoices.
confirmation_tokenYesThe confirmation_token of the answer of prepare_issue_invoice for this document.

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 already declare destructiveHint=true and idempotentHint=true, but the description goes further by explaining what the destruction means ("the document gets its number and issue date and is locked; it can't be edited any more or go back to a draft") and spelling out the exact refusal conditions (expired or mismatched token, draft changed after preparation, token consumed). The replay behavior is also stated concretely as returning the same answer without re-issuing.

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 action and its precondition, then side effects, then failure modes, then idempotency – a logical order with no filler. It is slightly dense in the second sentence (locking plus no-send combined), but every clause carries needed information.

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, token-gated mutation with no output schema, the description covers exactly what an agent needs: prerequisites, side effects, irreversibility, non-delivery, failure conditions, and retry semantics. Nothing material is left to inference.

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 100%, so the schema already documents each parameter, and the description adds real meaning by tying number and date to the preparation step ("the same number and date input") and tying confirmation_token to prepare_issue_invoice. That cross-tool consistency requirement is not expressed in the schema itself.

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 ("Issues the invoice draft") and anchors it to the sibling that must precede it ("summarised by prepare_issue_invoice"), so the agent can distinguish it from related tools like update_invoice_draft or email_invoice without inspecting 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?

Explicit precondition ("once the user has confirmed it") and explicit exclusions ("Nothing is sent to the customer or to KSeF"), which steers the agent away from email_invoice and send_invoice_to_ksef. It also names the retry condition, so the agent knows a repeated call is safe rather than a duplicate issue.

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