Skip to main content
Glama

Update invoice item

update_invoice_item
DestructiveIdempotent

Changes an item line of an invoice draft or an open proforma. Only the given fields of the line change. Nothing is issued. Issued documents can't be changed.

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>",
      "item_id": "<item_id>",
      "item": "<item>"
    },
    "name": "update_invoice_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYesThe fields of the item line to change.
item_idYesThe id of the item line, from the items of the document.
company_idYesThe id of the company, from list_companies.
invoice_idYesThe id of the document, from list_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent and destructive, but the description adds real behavioral context: the update is partial ('Only the given fields of the line change'), it never triggers issuance ('Nothing is issued'), and it fails on already-issued documents. What is not covered is what destructiveHint destroys in practice and whether totals/VAT are recomputed.

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?

Four short sentences, front-loaded with the scope, then the partial-update rule, then the two safety constraints. Nothing is padded or restated from the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a mutation tool with a nested enum-heavy item object and no output schema, but it stops short of telling the agent what returns (the updated line? recalculated totals?) or whether line-level VAT/total recalculation happens. With no output schema, one more sentence on the effect of the change would close the gap.

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 a step up by clarifying that the nested 'item' object is a partial patch rather than a full replacement — meaning omitted fields are preserved. That is genuine semantic value the schema alone does not state.

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?

States a specific verb ('Changes') and resource ('an item line of an invoice draft or an open proforma'), scoping it to editable documents. It is distinguishable from add_invoice_item or remove_invoice_item by the word 'changes' plus the partial-edit framing, though it never names an alternative explicitly.

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 a clear when-not ('Issued documents can't be changed') and bounds the target documents to drafts and open proformas. It does not explicitly route to siblings such as add_invoice_item for new lines or remove_invoice_item for deletions, leaving that inference to the agent.

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