Skip to main content
Glama

Invio Xero MCP

get_xero_profit_and_loss

get_xero_profit_and_loss
Read-only

Profit and Loss report from Xero for the current organisation, for a date range. Read-only. columns gives the period label(s) for the numbers in each row; rows are flattened from Xero's nested section layout (section names the enclosing group, e.g. "Income" or "Operating Expenses"; rowType "SummaryRow" marks a subtotal/total, not a line item - do not double-count a SummaryRow alongside the rows it totals). currency comes from this organisation's own Xero settings, never assumed from anything about the Invio account asking the question - state it whenever relaying a figure from this report. fromDate and toDate must be supplied TOGETHER or OMITTED TOGETHER - never just one; supplying only one is rejected rather than silently widened (see each argument's own description for why). This organisation's financial year is NOT necessarily the calendar year (added 11 September 2026 - see lib/xero/financial-year.ts). financialYear in the result names the organisation's real financial year end and its exact current/previous dates, or says the year end is unknown. Never answer "this financial year", "last financial year", or "year to date" from the calendar year or the organisation's country - use financialYear's dates as fromDate/toDate, and state the period you actually used when relaying a figure.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_xero_profit_and_loss"
  }
}

Input Schema

NameRequiredDescriptionDefault
toDateNoEnd date, YYYY-MM-DD. Must be supplied together with fromDate, or omitted together with it - never alone, for the identical reason. Omit both to get the CURRENT calendar month.
fromDateNoStart date, YYYY-MM-DD. Must be supplied together with toDate, or omitted together with it - never alone (Xero would default toDate to the end of the CURRENT month, not the month fromDate is in). Omit both to get the CURRENT calendar month.
organisationNoThe Xero organisation to use, by its display name. Only needed if this connection reaches more than one organisation - omit it when there is only one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / toDate / $ref
      Removed value: -"#/properties/fromDate"
    • addedInput schema / properties / toDate / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • addedInput schema / properties / toDate / type
      Added value: +"string"
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantive behavior: currency is sourced from the organisation's own Xero settings and must be stated when relaying figures, a lone date argument is rejected rather than silently widened, and the organisation's financial year may not be the calendar year with financialYear in the result resolving it. It also warns against double-counting SummaryRow alongside the rows it totals — real, non-obvious semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical scoping rules are front-loaded, but the together-or-omitted rule appears in the description and again in both parameter descriptions, and the parenthetical cross-reference '(see each argument's own description for why)' plus the changelog artifacts '(added 11 September 2026 - see lib/xero/financial-year.ts)' are internal noise that does not help an agent invoke the tool.

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?

With no output schema, the description carries the return-shape burden and does so: it explains columns as period labels, rows as flattened sections with rowType semantics, currency provenance, and financialYear contents. Combined with the invocation constraints, an agent has enough to call it and to report results correctly.

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%, so baseline is 3; the description earns above that by tying fromDate/toDate to financialYear's dates as the authoritative source for named periods, which the schema does not say. The `organisation` parameter is left entirely to the schema, and the columns/rows discussion describes returns rather than inputs.

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?

The first sentence names a specific verb+resource (retrieve the Profit and Loss report from Xero) and its scope (current organisation, date range), which is clearly distinct from the create/list/approve siblings. It stops short of naming the adjacent reporting siblings (get_xero_balance_sheet, get_xero_group_report), so an agent must infer which report type fits a given request.

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

Usage Guidelines4/5

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

Explicit constraints on invocation: fromDate and toDate must be supplied or omitted together, omitting both yields the current calendar month, and 'this financial year'/'year to date' must be derived from the returned financialYear rather than the calendar year or country. No guidance on when to pick this report over the balance sheet or group report siblings, which keeps it from a 5.

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.

Resources