xero_reports_aged_payables
Retrieve an Aged Payables report to view outstanding supplier bills grouped by payment due date age.
Instructions
Get an Aged Payables report showing outstanding supplier bills by age.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Report date in YYYY-MM-DD format (required) |
Implementation Reference
- src/domains/reports.ts:60-74 (schema)Schema definition for xero_reports_aged_payables tool. Defines its name, description, and input schema requiring a 'date' string in YYYY-MM-DD format.
{ name: "xero_reports_aged_payables", description: "Get an Aged Payables report showing outstanding supplier bills by age.", inputSchema: { type: "object", properties: { date: { type: "string", description: "Report date in YYYY-MM-DD format (required)", }, }, required: ["date"], }, }, - src/domains/reports.ts:119-127 (handler)Handler logic for xero_reports_aged_payables. Extracts the 'date' argument, calls the Xero API at Reports/AgedPayablesByContact, and returns the result as formatted JSON.
case "xero_reports_aged_payables": { const { date } = args as { date: string }; const response = await client.get("Reports/AgedPayablesByContact", { date, }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } - src/index.ts:267-269 (registration)Tool routing: all xero_reports_* tool calls (including xero_reports_aged_payables) are routed to handleReportTool in the reports domain.
if (name.startsWith("xero_reports_")) { return await handleReportTool(name, toolArgs); } - src/index.ts:83-84 (registration)The reportTools array (containing the xero_reports_aged_payables schema) is registered into the tool list via getAllDomainTools() and returned on ListTools requests.
case "reports": return reportTools; - src/domains/reports.ts:84-121 (helper)Uses getClient() from src/utils/client.ts which returns a XeroClient instance making authenticated GET requests to the Xero API base URL https://api.xero.com/api.xro/2.0/.
const client = getClient(); switch (name) { case "xero_reports_profit_and_loss": { const { fromDate, toDate } = args as { fromDate: string; toDate: string; }; const response = await client.get("Reports/ProfitAndLoss", { fromDate, toDate, }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } case "xero_reports_balance_sheet": { const { date } = args as { date: string }; const response = await client.get("Reports/BalanceSheet", { date }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } case "xero_reports_aged_receivables": { const { date } = args as { date: string }; const response = await client.get("Reports/AgedReceivablesByContact", { date, }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } case "xero_reports_aged_payables": { const { date } = args as { date: string }; const response = await client.get("Reports/AgedPayablesByContact", {