Skip to main content
Glama
Xero MCP Safe

Xero MCP Safe

by dwadlane

Draft invoice from a job

invoice_from_job
Idempotent

Convert a job description into a draft sales invoice with line items and 10% GST; preview it by default and create a draft only when confirmed.

Instructions

Turn a job description into a DRAFT sales invoice (ACCREC) with line items and 10% GST. Example: '3 hours labour at $120/hr, materials $450, call out fee $90'. Dry run by default: with confirm=false it returns the preview and creates nothing. With confirm=true it creates the invoice as DRAFT only. It is never approved or sent. Lines without a price are not charged.

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": {
      "job_description": "<job_description>"
    },
    "name": "invoice_from_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNoOptional explicit lines. Overrides parsing of job_description
confirmNo
contactNoCustomer name to look up
due_daysNo
referenceNo
contact_idNoXero ContactID, if you already have it
job_descriptionYes
amounts_include_gstNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations cover the safety profile (not read-only, not destructive, idempotent, open-world), and the description adds substantial context beyond them: preview returned with confirm=false, creation limited to DRAFT status, no approval or sending, 10% GST applied, and unpriced lines silently not charged. The last point is a notable side effect the agent would otherwise miss. It stops short of saying how contact lookup behaves (open-world external call) or whether repeated confirm=true calls reuse the idempotency key.

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?

Front-loaded with the outcome, then the example, then the dry-run/confirm behavior, then the DRAFT-only guarantee. Sentences are tight and each carries distinct information; only the trailing 'Lines without a price are not charged' feels appended rather than placed with the parsing discussion.

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?

With no output schema, the description correctly explains what comes back in each mode (preview vs created DRAFT). Given 8 parameters at low schema coverage and an open-world contact lookup, more detail on amount/GST toggling and contact resolution would complete the picture.

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 38% across 8 parameters, so compensation is needed and only partially delivered. The description explains the confirm semantics and shows the job_description parsing format by example, and it clarifies that unpriced lines are dropped, but due_days, reference, amounts_include_gst, and the contact vs contact_id precedence are left entirely to the schema.

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: 'Turn a job description into a DRAFT sales invoice (ACCREC) with line items and 10% GST', plus a concrete example input. The ACCREC framing implicitly separates it from the bill-oriented sibling, but no alternative tool is named, so differentiation is inferential rather than explicit.

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 dry-run default and the confirm=true path give clear operating context, and 'never approved or sent' bounds the outcome. However, there is no explicit when-to-use guidance versus siblings such as bill_from_document or find_contacts/contact_id, leaving the agent to infer routing from the resource type.

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