list_customers
Retrieve paginated customer lists from Siigo with optional filters for name or identification number to locate specific records efficiently.
Instructions
List customers with pagination and optional filters.
Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) name: Filter by customer name (partial match) identification: Filter by identification number (NIT/cédula)
Returns paginated list of customers with navigation links.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| page_size | No | ||
| name | No | ||
| identification | No |
Implementation Reference
- src/siigo_mcp/tools/customers.py:10-35 (handler)The core handler function for the 'list_customers' tool. Decorated with @mcp.tool for MCP registration. Implements pagination, filtering, and API call to list customers.@mcp.tool async def list_customers( ctx: Context, page: int = 1, page_size: int = 25, name: str | None = None, identification: str | None = None, ) -> dict[str, Any]: """List customers with pagination and optional filters. Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) name: Filter by customer name (partial match) identification: Filter by identification number (NIT/cédula) Returns paginated list of customers with navigation links. """ params: dict[str, Any] = {"page": page, "page_size": min(page_size, 100)} if name: params["name"] = name if identification: params["identification"] = identification return await get_client(ctx).get("/customers", params=params)
- src/siigo_mcp/tools/discovery.py:80-80 (registration)Maps the 'list_customers' tool to its implementation in the lazy-loading tool registry used by dynamic execution meta-tools."list_customers": customers.list_customers,
- Metadata entry in tool discovery index, defining name, category, and summary for 'list_customers' used in list_siigo_tools.{"name": "list_customers", "category": "customers", "summary": "List customers with pagination and filters"},