Skip to main content
Glama
XeroAPI

Xero MCP Server

Official

update-invoice

Modify draft invoices in Xero by updating line items, due dates, or references. All line items must be provided to replace existing ones.

Instructions

Update an invoice in Xero. Only works on draft invoices. All line items must be provided. Any line items not provided will be removed. Including existing line items. Do not modify line items that have not been specified by the user. When an invoice is updated, a deep link to the invoice in Xero is returned. This deep link can be used to view the contact in Xero directly. This link should be displayed to the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceIdYesThe ID of the invoice to update.
lineItemsNoAll line items must be provided. Any line items not provided will be removed. Including existing line items. Do not modify line items that have not been specified by the user
referenceNoA reference number for the invoice.
dueDateNoThe due date of the invoice.
dateNoThe date of the invoice.
contactIdNoThe ID of the contact to update the invoice for. Can be obtained from the list-contacts tool.
Behavior5/5

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

With no annotations provided, the description carries the full burden and excels by disclosing key behavioral traits: it specifies the draft-only limitation, the destructive nature of line item updates (removal of unspecified items), and the return value (a deep link to view the invoice in Xero), which is crucial for a mutation tool.

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?

The description is appropriately sized and front-loaded with the core purpose and constraints, though it could be slightly more streamlined by avoiding minor repetition (e.g., the line item rules are stated in both the description and schema). Every sentence adds value, but there's room for tighter phrasing.

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 complexity of a mutation tool with no annotations or output schema, the description is highly complete: it covers purpose, usage constraints, behavioral details (including destructive effects and return value), and parameter implications, leaving no significant gaps for the agent.

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 schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by reiterating the line item behavior, but it doesn't provide additional syntax or format details, meeting the baseline for high coverage.

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 the specific action ('Update an invoice in Xero'), resource ('invoice'), and scope ('Only works on draft invoices'), distinguishing it from sibling tools like 'create-invoice' or 'list-invoices' by focusing on modification rather than creation or listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use ('Only works on draft invoices') and provides clear behavioral guidance ('All line items must be provided. Any line items not provided will be removed. Including existing line items. Do not modify line items that have not been specified by the user'), which helps the agent understand critical constraints and avoid misuse.

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/XeroAPI/xero-mcp-server'

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