-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Summary
Please add a configurable pageSize parameter to list tools (list-invoices, list-contacts, list-quotes, etc.). Currently hardcoded to 10 in the handlers.
Use Case
When pulling large datasets (e.g., all invoices for a billing period, full customer lists), fetching 10 records at a time requires many sequential API calls. For example, retrieving 100 invoices currently requires 10 separate tool calls. A configurable page size would significantly improve efficiency for MCP clients.
Current Behaviour
src/handlers/list-xero-invoices.handler.ts line 28:
typescript10, // pageSize
Suggested Change
Add optional pageSize parameter to the tool schema:
typescript{
page: z.number(),
pageSize: z.number().min(1).max(100).optional().default(10),
contactIds: z.array(z.string()).optional(),
invoiceNumbers: z.array(z.string()).optional(),
}
The Xero API supports up to 100 records per page, so allowing users to specify between 1-100 would maintain compatibility while improving performance.
Affected Tools
list-invoices
list-contacts
list-quotes
list-credit-notes
list-payments
list-bank-transactions
(and other list-* tools)