list_invoices
Retrieve and filter invoices from Siigo with pagination by date range or customer name to manage billing records.
Instructions
List invoices with pagination and optional filters.
Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) date_start: Filter by start date (YYYY-MM-DD format) date_end: Filter by end date (YYYY-MM-DD format) customer_name: Filter by customer name (partial match)
Returns paginated list of invoices with navigation links.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_invoices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| page_size | No | ||
| date_start | No | ||
| date_end | No | ||
| customer_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/siigo_mcp/tools/invoices.py:12-40 (handler)The core handler function for the 'list_invoices' tool. It is decorated with @mcp.tool for MCP registration and implements the logic to fetch invoices from the Siigo API with pagination and optional date/customer filters.
async def list_invoices( ctx: Context, page: int = 1, page_size: int = 25, date_start: str | None = None, date_end: str | None = None, customer_name: str | None = None, ) -> dict[str, Any]: """List invoices with pagination and optional filters. Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) date_start: Filter by start date (YYYY-MM-DD format) date_end: Filter by end date (YYYY-MM-DD format) customer_name: Filter by customer name (partial match) Returns paginated list of invoices with navigation links. """ params: dict[str, Any] = {"page": page, "page_size": min(page_size, 100)} if date_start: params["date_start"] = date_start if date_end: params["date_end"] = date_end if customer_name: params["name"] = customer_name return await get_client(ctx).get("/invoices", params=params) - Metadata definition in TOOL_INDEX list, providing the tool's name, category, and summary for discovery purposes in lazy loading mode.
{"name": "list_invoices", "category": "invoices", "summary": "List invoices with pagination and filters"}, - src/siigo_mcp/tools/discovery.py:92-92 (registration)Registration of the 'list_invoices' tool in the dynamic tool function mapping used by discovery tools for lazy execution.
"list_invoices": invoices.list_invoices,