Skip to main content
Glama

Issue Invoice

issue_invoice
Destructive

Issue a draft invoice — the invoice page's Confirm. The invoice is numbered (if it has no number yet), its quantities are billed on the sales order it came from, and connected accounting integrations receive it. An issued invoice can no longer be edited. Two-step: preview=true, then commit with the previewReceipt.

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

Input Schema

NameRequiredDescriptionDefault
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing is written until the commit call.
clientIdNoOptional client id (GUID) for operator (unpinned) credentials on 3PL tenants.
invoiceIdYesDraft invoice id (GUID) or number from list_invoices.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2: the receipt returned by the preview call. Supply with a fresh idempotencyKey to commit.

Output Schema

NameRequiredDescriptionDefault
okNo
numberNo
statusNo
previewNo
warningsNo
expiresAtNo
invoiceIdNo
totalAmountNo
actionItemIdNo
confirmationNo
documentKindNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
approvalRequiredNo
approvalRuleNameNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=false), the description discloses substantial behavior: numbering of unnumbered invoices, that quantities are billed against the originating sales order, that accounting integrations are notified, and critically that the invoice becomes permanently non-editable. That last point is exactly the consequence an agent needs before invoking a destructive tool.

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 short sentences, front-loaded with the action and its identity, followed by consequences and then the required call sequence. No filler; every clause carries decision-relevant 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?

The tool has an output schema, so return values need not be explained. With safety semantics, side effects (numbering, billing, integration sync), irreversibility, and the mandatory two-call protocol all covered, an agent has everything needed to invoke it 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?

Schema description coverage is 100%, so every parameter including preview, previewReceipt, and idempotencyKey is already documented in the schema. The description reinforces the two-step flow but adds no format or constraint detail beyond what the schema already supplies, which is the baseline-3 case.

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 a specific verb and resource ('Issue a draft invoice') and even maps it to the UI action ('the invoice page's Confirm'), making it trivially distinguishable from siblings like create_invoice or get_invoice. It also names the exact preconditions (draft, may be unnumbered).

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?

It gives a clear operational context: the tool is for issuing an existing draft, and it spells out the required two-step sequence (preview=true, then commit with the previewReceipt). It does not explicitly route to siblings (e.g., 'use create_invoice first if no draft exists'), so it falls just short of full when/when-not guidance.

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