Skip to content

Feature Request: Add pageSize parameter to list tools #114

@morrow1978

Description

@morrow1978

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions