Skip to main content
Glama

Multi Books

Change an invoice

invoices_update
Destructive

Change one invoice of a company - its details, a line by its id, or a line added - and answer it whole. Only the fields given change: on FreeAgent by the names invoices_get answers a FreeAgent invoice with, on Xero by Xero's own, its contact named by ContactID alone and every line the change does not name sent back by its LineItemID, so each stays as it was; a Xero draft is approved by Status AUTHORISED, a change of its own, and any automatic collection the organisation set up in Xero, such as a GoCardless Direct Debit mandate, then runs on it as it would on an invoice approved in Xero. On Zoho Books by Zoho's own names: the customer stays, and every line the change does not name goes back by its line_item_id, so each stays as it was - a line with none is added, naming its item by item_id; the organisation's own workflow rules in Zoho may still email on a change. On QuickBooks by QuickBooks' own names: the customer stays, and the change goes to the invoice as just read - one QuickBooks refuses because the invoice changed there meanwhile is answered with a note to read it again. On QuickBooks a change naming no line leaves every line as it is; one naming lines sends every line the invoice holds back as it reads, by its Id, so each stays as it was, a line with no Id added whole. An Amount changed alone stands; Qty and UnitPrice change with the Amount they make; outside the US, on a company charging tax, a line added names its TaxCodeRef; and QuickBooks works the tax out again on the lines as changed. Each call is one write, sent to the company's program once - to FreeAgent, or to Xero under a request key of its own, so Xero never takes it twice. A Zoho Books organisation's write goes to Zoho Books, which takes no request key. One given in another program's names, or naming an id of another program's form, is not_written with reason refused, nothing sent; one Xero keeps from the person's Xero role, with reason xero_role. A company set to read only refuses it before its program is asked, and so do words that screen as a prompt attack. outcome is written with the record; not_written with reason and, where its program refused it, what it said; or unknown where its answer never came and reading the books back could not tell, found naming every identical new record where two were made and none where that read itself failed. A write whose answer never came is settled by reading the books back, never sent again. Where the screening holds back its program's words in the answer, the outcome and each record's id stand, marked withheld with why. A QuickBooks company's write goes to QuickBooks under a request key of its own, so QuickBooks never takes it twice.

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": "<company>",
      "invoice": "<invoice>",
      "changes": "<changes>"
    },
    "name": "invoices_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
changesYes
companyYesThe id companies_list gives the company.
invoiceYesThe invoice's id, as invoices_list answers it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already mark this as a destructive write, and the description adds substantial context beyond them: per-provider write routing, request-key idempotency, partial-update semantics, refusal reasons, read-back settlement of unknown outcomes, and automatic Xero collection behavior. It also warns that Zoho workflow rules may email and that QuickBooks can reject a conflicting write, which meaningfully informs safe use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is front-loaded and clear, but the rest is a dense, run-on wall of provider-specific clauses with repeated phrasing such as 'so each stays as it was.' The information could be organized into shorter sections or bullets, and the current form is unnecessarily difficult to parse.

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?

Given the complex three-parameter schema with four provider variants and no output schema, the description covers the necessary ground: outcomes, refusal reasons, idempotency, read-back behavior, line-item semantics, and provider-specific caveats. An agent has enough information to invoke the tool correctly, even though the presentation is verbose.

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 67%, and the description adds real meaning beyond the schema for the `changes` parameter: only named fields change, existing lines are identified by provider-specific IDs, omitted lines stay as they were, new lines are added without an ID, and contact handling differs by provider. Some of this duplicates schema descriptions, but the behavioral semantics of partial updates and line replacement are genuinely value-adding.

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?

The opening sentence gives a specific verb and resource: 'Change one invoice of a company - its details, a line by its id, or a line added.' This clearly distinguishes an update from reading or creating, but it does not explicitly name or contrast sibling tools such as invoices_create or invoices_delete.

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 description implies when to use it by saying 'Only the fields given change' and repeatedly references invoices_get for field names, but it does not explicitly state when to choose this over invoices_create, invoices_delete, or other update tools. The provider-specific paragraphs explain behavior rather than selection criteria.

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.