Skip to main content
Glama

Multi Books

Create an invoice

invoices_create

Create an invoice in one company's books, as a draft where its program keeps one, and answer it whole with its lines: a FreeAgent company's by the names invoices_get answers a FreeAgent invoice with, a Xero organisation's by Xero's own, its Contact by ContactID alone; invoices_update approves a Xero draft. A Zoho Books organisation's goes by Zoho's own names, its customer by customer_id and each line naming its item by item_id, as items_list answers it - items_create makes one. Each line carries the tax its organisation's edition asks for: tax_id a VAT rate on a UK organisation, is_inclusive_tax saying whether rates include it, a sales tax on a US one, and the treatment and place_of_supply where an edition asks them; one missing what its edition needs is refused in Zoho's own words. Zoho Books keeps it a draft, and it is not emailed, which the answer says; the organisation's own workflow rules in Zoho may still email on a create. A QuickBooks company's goes by QuickBooks' own names, its customer by CustomerRef and each line a SalesItemLineDetail naming its item by ItemRef, as items_list answers it. A line's Amount is before tax on every QuickBooks company, QuickBooks adding the tax, and is Qty times UnitPrice where they are given. Outside the US, on a company charging tax, the invoice names its GlobalTaxCalculation - TaxExcluded or TaxInclusive - and each line its TaxCodeRef, a tax code's Id as tax_rates_list answers it, or it is refused with nothing sent to QuickBooks; on one charging none - its tax none as companies_list answers it - neither is needed and it carries no tax. On a US company a line's TaxCodeRef is TAX or NON, QuickBooks charging the taxable lines the sales tax rate it holds for the customer. QuickBooks keeps no draft invoice: it is posted to the books when created and is not emailed, which the answer says. QuickBooks numbers it, save on a company set to number its invoices itself, where it is created unnumbered and numbered in QuickBooks. 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>"
    },
    "name": "invoices_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
companyYesThe id companies_list gives the company.
invoiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the write semantics are partly covered, yet the description adds substantial context beyond them: draft-vs-posted behavior per program, whether the invoice is emailed, that QuickBooks numbers it unless the company self-numbers, read-only companies refusing before dispatch, prompt-attack screening, and idempotency via request keys for Xero and QuickBooks. It also documents the outcome vocabulary (written, not_written with reason/refused, xero_role, unknown) and that a lost answer is settled by read-back rather than resending. This is unusually rich disclosure.

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?

A single unbroken block of run-on prose of roughly 600 words with no segmentation by provider or concern, so an agent must parse dense clauses like 'a FreeAgent company's by the names invoices_get answers a FreeAgent invoice with'. Content is mostly substantive but is repeated (the request-key guarantee is stated for Xero mid-text and again for QuickBooks at the end), and front-loading is lost after the first clause.

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?

There is no output schema, so the description must explain return values, and it does: whole-invoice answers with lines, outcome states, per-record ids, and withheld fields with reasons. For a tool that fans out across four accounting programs with divergent payload contracts, the coverage of drafts, numbering, tax requirements, refusal reasons, and unreachable-answer reconciliation is close to what an agent needs; the main shortfall is that the tax and edition-specific rules are compressed into one long sentence rather than tied explicitly to each anyOf branch.

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?

With schema coverage at roughly 50% the description has to carry weight, and it does: it maps customer to ContactID on Xero, CustomerRef on QuickBooks, customer_id on Zoho, ties lines to items via item_id/ItemRef, explains the TaxCodeRef TAX/NON rule on US QuickBooks companies versus tax-code Ids elsewhere, and describes the tax_id/is_inclusive_tax/place_of_supply requirements per Zoho edition. It also states cross-field rules (Amount before tax, Qty times UnitPrice) and the GlobalTaxCalculation requirement outside the US. Some of this merely restates schema property descriptions, and the per-provider structure is hard to map back onto the anyOf branches, which keeps it from a 5.

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?

Opens with a concrete verb and resource: 'Create an invoice in one company's books'. It goes further than most by stating the return shape ('answer it whole with its lines') and by scoping the payload shape per accounting program (FreeAgent/Xero/Zoho/QuickBooks). The phrasing is convoluted ('as a draft where its program keeps one'), which blurs the headline slightly, but an agent can still tell this apart from invoices_update or invoices_send.

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?

Guidance is embedded rather than stated: it notes 'invoices_update approves a Xero draft' and that items_create makes an item referenced by item_id, which hints at prerequisites and follow-ups. It never gives a clean when-to-use/when-not-to-use rule against siblings such as invoices_send or recurring_invoices_create, so the agent must infer selection from the payload-shape narrative.

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.