Skip to main content
Glama
amin-ale

QuickBooks Online MCP Server

by amin-ale

Update invoice

update_invoice
Destructive

Replace an existing invoice's full contents, including all line items, to correct amounts, dates, or the billed customer. Requires a fresh SyncToken; linked payments remain unchanged.

Instructions

Replace the contents of an existing invoice. Use it to correct amounts, dates, or the billing customer. Write operation that overwrites the live record: the line array is replaced wholesale, so send every line the invoice should end with or the omitted ones are dropped and the total changes. Not idempotent, and it requires the Id plus the SyncToken from a fresh get_invoice; a stale token fails with error 5010. Payments already linked to the invoice are not adjusted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesFull replacement contents for the invoice, including every line it should end with, not only the changed ones.
invoice_idYesQuickBooks Invoice Id, as returned by search_invoices, list_invoices, or create_invoice. This is the internal Id, not the DocNumber printed on the invoice.
sync_tokenYesSyncToken from a fresh get_invoice call for this Id. QuickBooks rejects a stale token with error 5010, so re-read the invoice instead of reusing an older token.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
invoiceNo
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

The description goes well beyond the annotations: it discloses that the line array is replaced wholesale, omitted lines are dropped, and totals will change. It also warns that the operation is not idempotent, that it overwrites the live record, and that existing linked payments are not adjusted. This is richly transparent for a destructive write operation.

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?

The description is compact and front-loaded: purpose first, then usage, then behavioral caveats. Every sentence earns its place, and the most important warning about wholesale line replacement appears early. Despite covering several distinct risks, it avoids bloat.

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 mutation with annotations already marking it non-idempotent and destructive, the description supplies the missing operational details: the stale-token failure mode, the need for a fresh SyncToken, the replacement semantics, and the interaction with linked payments. With an output schema present, nothing critical is left for the agent to infer.

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 the baseline is 3. The description reinforces the key semantic point that the lines array is a full replacement, and it restates the SyncToken freshness requirement, but most of this is already present in the parameter descriptions. It does not add substantially new per-parameter meaning beyond what the schema provides.

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 opens with a specific verb and resource: "Replace the contents of an existing invoice." It then names concrete use cases (correct amounts, dates, or the billing customer), making it immediately distinguishable from sibling update_customer and update_payment tools. The wholesale-replacement warning further pins down what this tool uniquely does.

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 explicitly states when to use the tool: to correct amounts, dates, or the billing customer on an existing invoice. It also gives crucial procedural context, requiring the Id and a fresh SyncToken from get_invoice, and warns that stale tokens fail with error 5010. It does not explicitly enumerate when not to use it or name an alternative for payment adjustments, but the guidance is otherwise clear.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/amin-ale/mcp-quickbooks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server