Skip to main content
Glama

Invio Xero MCP

create_xero_timesheet

create_xero_timesheet

Proposes a DRAFT timesheet for one employee/period, for Australian, New Zealand or United Kingdom organisations - it does NOT touch Xero itself, and never will on its own. This queues a pending change that a human must explicitly approve (your Xero MCP connector - the exact link is this response's own approvalUrl field) before Xero is touched at all; you have no way to approve it yourself. employeeId and payrollCalendarId must both come from list_xero_payroll_employees (never invented) - use that SAME employee's own payrollCalendarId field. lines is date-keyed: one entry per day actually worked, each naming an earningsRateId and how many hours. For Australia, use that SAME employee's own ordinaryEarningsRateId (from list_xero_payroll_employees) unless the user names a different rate. For New Zealand and the United Kingdom, an employee record carries no earnings rate of its own - call list_xero_payroll_earnings_rates first and use the RegularEarnings-type rate unless the user names a different one. Use an hourly pay item: Xero refuses an allowance or a per-unit pay item on a timesheet. In every region startDate/endDate must be exactly ONE WHOLE pay period of the employee's own pay calendar in Xero (7 days on a weekly calendar, 14 on a fortnightly one, 28 on a four-weekly one, one month on a monthly one), not just the days actually worked; days with no hours simply carry no line. This tool reads the employee's calendar and checks the period when it drafts: if the dates are not one whole period it refuses and tells you the start and end dates to use, so draft again with those. The created timesheet starts as a Xero-side DRAFT once approved - a human remains free to review or change it inside Xero afterwards, unlike post_xero_pay_run. This tool cannot say whether Xero will accept the earnings rate - that is refused, with Xero's own reason, only once a human approves.

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": {
      "employeeId": "<employeeId>",
      "payrollCalendarId": "<payrollCalendarId>",
      "startDate": "<startDate>",
      "endDate": "<endDate>",
      "lines": "<lines>"
    },
    "name": "create_xero_timesheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesOne entry per day actually worked - omit days with no hours rather than including a zero.
endDateYesEnd of the timesheet period, YYYY-MM-DD (the last day of that pay period). If the user wrote a bare numeric date with no month name ("9/8", "08/09"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. In every region the period must be exactly ONE WHOLE pay period of the employee's own pay calendar in Xero - 7 days on a weekly calendar, 14 on a fortnightly one, 28 on a four-weekly one, one month on a monthly one - starting on a day that calendar's periods start on, not just the days actually worked. Days with no hours simply carry no line at all. This tool checks the period against the calendar when it drafts and, if it does not match, refuses and names the start and end dates to use.
startDateYesStart of the timesheet period, YYYY-MM-DD. If the user wrote a bare numeric date with no month name ("9/8", "08/09"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. In every region the period must be exactly ONE WHOLE pay period of the employee's own pay calendar in Xero - 7 days on a weekly calendar, 14 on a fortnightly one, 28 on a four-weekly one, one month on a monthly one - starting on a day that calendar's periods start on, not just the days actually worked. Days with no hours simply carry no line at all. This tool checks the period against the calendar when it drafts and, if it does not match, refuses and names the start and end dates to use.
employeeIdYesGet this from list_xero_payroll_employees first - never invent one.
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.
payrollCalendarIdYesGet this from the SAME employee's own payrollCalendarId field on list_xero_payroll_employees - never invent one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / endDate / description
      Previous value: -"End of the timesheet period, YYYY-MM-DD. If the user wrote a bare numeric date with no month name (\"9/8\", \"08/09\"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. For New Zealand and the United Kingdom, this period must span the employee's WHOLE payroll-calendar period (for example, Monday to Sunday on a weekly calendar), not just the days actually worked - a shorter period was refused live even though every line inside it was valid. Days with no hours simply carry no line at all; the period itself still has to cover the full calendar cycle. Observed live 12 September 2026, not stated in Xero's own API specification."New value: +"End of the timesheet period, YYYY-MM-DD (the last day of that pay period). If the user wrote a bare numeric date with no month name (\"9/8\", \"08/09\"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. In every region the period must be exactly ONE WHOLE pay period of the employee's own pay calendar in Xero - 7 days on a weekly calendar, 14 on a fortnightly one, 28 on a four-weekly one, one month on a monthly one - starting on a day that calendar's periods start on, not just the days actually worked. Days with no hours simply carry no line at all. This tool checks the period against the calendar when it drafts and, if it does not match, refuses and names the start and end dates to use."
    • changedInput schema / properties / startDate / description
      Previous value: -"Start of the timesheet period, YYYY-MM-DD (AU: exactly 7 days including endDate). If the user wrote a bare numeric date with no month name (\"9/8\", \"08/09\"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. For New Zealand and the United Kingdom, this period must span the employee's WHOLE payroll-calendar period (for example, Monday to Sunday on a weekly calendar), not just the days actually worked - a shorter period was refused live even though every line inside it was valid. Days with no hours simply carry no line at all; the period itself still has to cover the full calendar cycle. Observed live 12 September 2026, not stated in Xero's own API specification."New value: +"Start of the timesheet period, YYYY-MM-DD. If the user wrote a bare numeric date with no month name (\"9/8\", \"08/09\"), do NOT settle it on your own judgement - it is 9 August to most of the world and 8 September in the US, and nothing downstream of this field can tell which you meant once it is a date. Follow the DATES instruction in this tool's description. In every region the period must be exactly ONE WHOLE pay period of the employee's own pay calendar in Xero - 7 days on a weekly calendar, 14 on a fortnightly one, 28 on a four-weekly one, one month on a monthly one - starting on a day that calendar's periods start on, not just the days actually worked. Days with no hours simply carry no line at all. This tool checks the period against the calendar when it drafts and, if it does not match, refuses and names the start and end dates to use."
  2. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / employeeId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • removedInput schema / properties / lines / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / lines / items / properties / earningsRateId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • addedInput schema / properties / payrollCalendarId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare a mutation (readOnlyHint=false) with openWorldHint=true, but not the crucial fact that nothing is written until a human approves via the approvalUrl this response returns. The description also discloses that the result lands as a Xero-side DRAFT and that earnings-rate rejection only surfaces at approval time, which the annotations cannot express. It stops short of describing the response shape beyond the approvalUrl field, but the core pre-write and post-approval behavior is very clear.

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 draft/approval model is correctly front-loaded, but the approval concept is restated across several clauses ('does NOT touch Xero itself', 'before Xero is touched at all', 'you have no way to approve it yourself') and the whole-pay-period rule is repeated in the body. About a third of the text is redundancy an agent does not need.

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?

For a multi-region mutation with no output schema, the definition covers the human-approval gate, the checkout returns an approvalUrl, prerequisite lookup calls, region-specific rate sourcing, whole-pay-period validation, and the failure/refusal behavior. Nothing an agent must know before calling is absent.

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%, and the startDate/endDate/lines fields already carry the whole-pay-period rule and the date-keyed line format. The description mostly restates that region-specific earnings-rate logic rather than adding new semantics, though it does state the two identifiers' provenance more concisely than the schema does.

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 first sentence names a specific action and resource ('Proposes a DRAFT timesheet for one employee/period') plus the supported regions, and later contrasts itself with post_xero_pay_run. An agent can tell what it creates and what it does not create without opening the schema.

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 routes the agent to prerequisites explicitly: employeeId and payrollCalendarId must come from list_xero_payroll_employees, and NZ/UK organisations require list_xero_payroll_earnings_rates first. Per-region rate selection rules ('use the SAME employee's own ordinaryEarningsRateId' for AU, RegularEarnings-type for NZ/UK) and the hourly-pay-item restriction remove ambiguity.

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