Skip to main content
Glama

Update invoice

crunch_update_invoice
Idempotent

Updates an existing sales invoice by applying only the fields you provide, preserving payments and attachments; replacing items overwrites all invoice lines.

Instructions

Change a sales invoice. The current invoice is fetched and only what you pass changes; existing payments and attachments are kept. items replaces all lines. Issued invoices may be restricted by Crunch.

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": {
      "invoice_id": "<invoice_id>"
    },
    "name": "crunch_update_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoNew note printed on the invoice
itemsNoReplacement lines (all existing lines are replaced)
changesNoRaw SalesInvoiceDto fields to merge into the current invoice (advanced)
dry_runNoPreview: return the request that would be sent (for an update, the fields that would change) without sending it
due_dateNoNew due date (YYYY-MM-DD)
client_idNoMove the invoice to this customer
referenceNoNew reference
invoice_idYesInvoice ID (see crunch_list_invoices)
issued_dateNoNew invoice date (YYYY-MM-DD)
purchase_orderNoNew purchase order number
send_remindersNoHave Crunch email the customer payment reminders (true needs CRUNCH_ALLOW_EMAIL=true)
bank_account_idNoBank account shown on the invoice
payment_terms_daysNoPayment terms in days

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnly=false, idempotent=true, destructive=false. The description adds genuine context beyond that: the current invoice is fetched and only supplied fields change, payments and attachments survive, and `items` wholesale-replaces all lines – a partial-destructive nuance the annotations do not convey. It could still say more about what happens on restricted issued invoices (error vs silent ignore).

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 core action, then the merge contract, then the one hazard (items replacement), then the restriction caveat. No filler and nothing buried.

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?

With 13 parameters, nested line objects, and no output schema, the description covers the two things an agent could most easily get wrong: partial-update semantics and total line replacement. Minor gaps remain around the advanced `changes` escape hatch and dry_run, both of which the schema documents well.

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 baseline is 3, but the description earns above that by explaining the merge model (unspecified fields are preserved) and flagging that `items` replaces the entire line set rather than appending. That is real meaning the per-parameter schema text does not supply.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Change a sales invoice" gives a specific verb and resource, and the merge semantics distinguish it from create/issue siblings in the same family. It stops short of naming which sibling to use for issuing or adding payments, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied (use this to modify an existing invoice), and it adds one real caveat – issued invoices may be restricted by Crunch. There is no explicit routing advice (e.g., use crunch_issue_invoice to issue, crunch_add_invoice_payment to add payments), leaving alternatives to inference.

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

Deploy Server

Other Tools