Skip to main content
Glama

update_invoice

Update an existing sales invoice or purchase bill by modifying line items, account codes, and other fields.

Instructions

Updates an existing sales invoice or purchase bill (typically a draft) to change fields like line items and account codes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitdpNoOptional. Unit decimal places (e.g. 4) for unit amounts on line items
invoicesYesInvoices payload containing an array of invoice objects
invoiceIDYesXero generated unique identifier for the invoice (UUID)
idempotencyKeyNoOptional idempotency key. Allows safe retries without duplicating processing
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It mentions 'typically a draft' but does not disclose what happens if the invoice is not a draft, whether updates are restricted, or any side effects. The parameter 'idempotencyKey' hints at safe retries but is not explained.

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 a single sentence of 16 words, front-loading the core action and typical use case with no wasted words.

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 complex update tool with 4 parameters and nested objects, the description is minimal. It covers the basic purpose but lacks guidance on prerequisites, return behavior, and edge cases. It is adequate but leaves significant gaps.

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% with detailed descriptions for each parameter. The description adds value by summarizing the main updatable fields (line items, account codes), but mostly reiterates what the schema already provides. Baseline 3 is increased to 4 due to the a helpful overview.

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 clearly states it updates an existing invoice or bill, specifies the typical state (draft), and gives example fields (line items, account codes), distinguishing it from sibling tools like get_invoice and create_invoice.

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 it's used when you need to modify a draft invoice, but does not explicitly state when to use or when not to use, nor does it mention alternatives like create_invoice for new ones.

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

Install Server

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/john-zhang-dev/xero-mcp'

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