Skip to main content
Glama

Xero Create Invoice

xero_create_invoice

Create sales invoices in Xero from a contact ID and JSON line items, with optional dates, status, currency, and reference fields. Requires write access enabled.

Instructions

Create a sales invoice. Requires XERO_WRITE_ENABLED=true.

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": {
      "contact_id": "<contact_id>",
      "line_items": "<line_items>"
    },
    "name": "xero_create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoInvoice date (YYYY-MM-DD)
statusNoDRAFT or AUTHORISEDDRAFT
currencyNoCurrency code (default: org currency)
due_dateNoDue date (YYYY-MM-DD)
referenceNoReference/PO number
contact_idYesContact UUID
line_itemsYesJSON array: [{"Description":"...","Quantity":1,"UnitAmount":100}]

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does add genuinely useful context that the schema does not convey: this is a write operation gated behind XERO_WRITE_ENABLED. However it omits what the DRAFT vs AUTHORISED choice actually does (approving/sending), whether the invoice is emailed, and what failures look like.

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?

Two short sentences with no filler, and the action is front-loaded ahead of the prerequisite. It is lean to the point of being under-specified, but that gap is captured elsewhere rather than being a conciseness defect.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, but for a 7-parameter write operation with zero annotations the description is thin. It says nothing about the DRAFT/AUTHORISED consequence, duplicate invoices, or the JSON line_items requirement, leaving the agent to rely entirely on the schema.

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 defines all seven parameters including formats and the default DRAFT status. The description adds no parameter meaning beyond that, which is the baseline 3 case when the schema does the heavy lifting.

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?

States a specific verb and resource ("Create a sales invoice"), which is enough to distinguish it from purchase-side siblings like xero_create_bill and from xero_create_quote. It does not explicitly name any sibling, so differentiation is inferred rather than stated.

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

Usage Guidelines2/5

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

The only guidance is a prerequisite flag (XERO_WRITE_ENABLED=true), which is useful but is a gate, not a when-to-use rule. Nothing says when to use this versus xero_create_bill, xero_create_quote, or xero_update_invoice, and there are no stated exclusions.

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