list_customers
Retrieve and filter customer data from Siigo's electronic invoicing system using pagination, name, or identification number parameters.
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-34 (handler)The implementation of the list_customers tool handler, which calls the Siigo API to list customers with optional pagination and filters.@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/server.py:111-111 (registration)Import statement that loads the customers module in non-lazy mode, triggering registration of the list_customers tool via @mcp.tool decorator.from siigo_mcp.tools import customers # noqa: E402, F401
- src/siigo_mcp/tools/discovery.py:80-80 (registration)Mapping of 'list_customers' to its handler function in the lazy-loading _tool_functions dictionary."list_customers": customers.list_customers,
- Discovery metadata entry for the list_customers tool, providing name, category, and summary for dynamic tool listing.{"name": "list_customers", "category": "customers", "summary": "List customers with pagination and filters"},