Skip to main content
Glama

Update invoice

update_invoice
Idempotent

Partially update an invoice — only provided fields change. Changing amount/tax_rate/tax_set recomputes tax_amount/total_amount server-side; changing retainage_percent (or amount/tax_rate/tax_set alongside it) recomputes retainage_amount from the resulting total_amount.

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

Input Schema

NameRequiredDescriptionDefault
notesNo
amountNo
statusNo
tax_setNo
agent_idNo
due_dateNo
tax_rateNo
invoice_idYes
descriptionNo
customer_nameNo
retainage_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare the write is non-destructive, idempotent, and closed-world, so the bar is lower. The description adds genuinely valuable behavior beyond them: derived server-side recomputation of tax_amount/total_amount and of retainage_amount from the resulting total, including the ordering interaction when retainage_percent is changed alongside amount/tax_rate/tax_set.

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?

Two dense sentences, front-loaded with the partial-update rule before the recomputation mechanics; nothing is filler. The semicolon-chained clause about retainage is slightly heavy to parse but every element carries real information.

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?

For a mutation tool with 11 parameters, no output schema, and zero schema descriptions, the description covers the derived-field behavior well but not the remaining mutable fields or the enum vocabularies. An agent can invoke it correctly for financial edits but is under-informed about the rest of the payload.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 11 parameters, so the description must carry the full burden. It explains the interplay of amount, tax_rate, tax_set, and retainage_percent, but leaves notes, status, agent_id, due_date, description, customer_name, and invoice_id completely unexplained, and gives no meaning for the two enum sets (status values, tax_set values).

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?

"Partially update an invoice — only provided fields change" states a specific verb and resource and adds the partial-update semantics that separate it from a full replace. It does not explicitly distinguish the invoice header from line-level siblings such as update_invoice_line, so the agent must infer that boundary.

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?

The partial-update framing implies "use this when you only want to change some fields," which is useful implied guidance. There is no explicit when-to-use/when-not, no mention of update_invoice_line versus this tool, and no stated prerequisites beyond the required invoice_id.

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