Let me start by saying I am not a developer, but have been using this MCP from Claude mostly successfully until I needed some cash based reporting. Thanks in advance for taking a look at this.
Summary
When using the list-profit-and-loss tool with paymentsOnly=true, the response appears identical to calling the tool without the parameter. Xero support confirmed on our end that they haven't seen any API requests from our keys using the paymentsOnly parameter in the last 30 days, which suggests it may not be getting passed through to the underlying API call.
What I'm seeing
Calling list-profit-and-loss with fromDate, toDate, and paymentsOnly=true returns the same report data as calling it without paymentsOnly. Our org runs on cash basis, so we'd expect the revenue and cost figures to differ between the two modes.
What I think might be happening
Looking at the handler code in src/handlers/list-xero-profit-and-loss.handler.ts, I noticed that listXeroProfitAndLoss() accepts 6 parameters (including paymentsOnly as the 6th), but when it calls the internal fetchProfitAndLoss(), it appears to pass only 5 arguments:
typescriptconst profitAndLoss = await fetchProfitAndLoss(
fromDate,
toDate,
periods,
timeframe,
paymentsOnly, // this lands in the "standardLayout" position
);
If I'm reading it correctly, standardLayout may be getting skipped in the call, which would shift paymentsOnly into the wrong position. The fetchProfitAndLoss() function signature expects standardLayout as the 5th argument and paymentsOnly as the 6th.
For reference, the trial balance handler in PR #39 follows a similar pattern and passes paymentsOnly correctly as a direct positional argument to the SDK method, so the approach is proven to work.
Expected behavior
Passing paymentsOnly=true should return cash-basis P&L data, with revenue reflecting payments received and costs reflecting payments made during the period, rather than invoices/bills dated in the period.
Environment
Using the Xero MCP server via Claude's connector integration
Xero org is configured for cash basis reporting
Let me start by saying I am not a developer, but have been using this MCP from Claude mostly successfully until I needed some cash based reporting. Thanks in advance for taking a look at this.
Summary
When using the list-profit-and-loss tool with paymentsOnly=true, the response appears identical to calling the tool without the parameter. Xero support confirmed on our end that they haven't seen any API requests from our keys using the paymentsOnly parameter in the last 30 days, which suggests it may not be getting passed through to the underlying API call.
What I'm seeing
Calling list-profit-and-loss with fromDate, toDate, and paymentsOnly=true returns the same report data as calling it without paymentsOnly. Our org runs on cash basis, so we'd expect the revenue and cost figures to differ between the two modes.
What I think might be happening
Looking at the handler code in src/handlers/list-xero-profit-and-loss.handler.ts, I noticed that listXeroProfitAndLoss() accepts 6 parameters (including paymentsOnly as the 6th), but when it calls the internal fetchProfitAndLoss(), it appears to pass only 5 arguments:
If I'm reading it correctly, standardLayout may be getting skipped in the call, which would shift paymentsOnly into the wrong position. The fetchProfitAndLoss() function signature expects standardLayout as the 5th argument and paymentsOnly as the 6th.
For reference, the trial balance handler in PR #39 follows a similar pattern and passes paymentsOnly correctly as a direct positional argument to the SDK method, so the approach is proven to work.
Expected behavior
Passing paymentsOnly=true should return cash-basis P&L data, with revenue reflecting payments received and costs reflecting payments made during the period, rather than invoices/bills dated in the period.
Environment
Using the Xero MCP server via Claude's connector integration
Xero org is configured for cash basis reporting