list_credit_notes
Retrieve and filter credit notes from Siigo's electronic invoicing system with pagination options for date ranges and result management.
Instructions
List credit notes 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)
Returns paginated list of credit notes with navigation links.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| page_size | No | ||
| date_start | No | ||
| date_end | No |
Implementation Reference
- The main handler function decorated with @mcp.tool, implementing the logic to list credit notes from the Siigo API with pagination and optional date filters.@mcp.tool async def list_credit_notes( ctx: Context, page: int = 1, page_size: int = 25, date_start: str | None = None, date_end: str | None = None, ) -> dict[str, Any]: """List credit notes 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) Returns paginated list of credit notes 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 return await get_client(ctx).get("/credit-notes", params=params)
- src/siigo_mcp/tools/discovery.py:103-103 (registration)Registration of the tool name to the handler function imported from credit_notes module, used in lazy loading mode."list_credit_notes": credit_notes.list_credit_notes,
- Tool index entry used for discovery, providing name, category, and summary description.{"name": "list_credit_notes", "category": "credit_notes", "summary": "List credit notes with pagination"},