list_products
Retrieve and filter products from Siigo's inventory with pagination controls to manage large datasets efficiently.
Instructions
List products with pagination and optional filters.
Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) code: Filter by product code (partial match) name: Filter by product name (partial match)
Returns paginated list of products with navigation links.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| page_size | No | ||
| code | No | ||
| name | No |
Implementation Reference
- src/siigo_mcp/tools/products.py:10-35 (handler)The primary handler implementation for the 'list_products' MCP tool. This async function, decorated with @mcp.tool, handles pagination, filtering by code/name, and calls the Siigo API to retrieve products.@mcp.tool async def list_products( ctx: Context, page: int = 1, page_size: int = 25, code: str | None = None, name: str | None = None, ) -> dict[str, Any]: """List products with pagination and optional filters. Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) code: Filter by product code (partial match) name: Filter by product name (partial match) Returns paginated list of products with navigation links. """ params: dict[str, Any] = {"page": page, "page_size": min(page_size, 100)} if code: params["code"] = code if name: params["name"] = name return await get_client(ctx).get("/products", params=params)
- src/siigo_mcp/tools/discovery.py:86-86 (registration)Registration mapping in the lazy-loading tool functions dictionary, associating the tool name 'list_products' with the function from the products module."list_products": products.list_products,
- Metadata entry in TOOL_INDEX for tool discovery, including name, category, and summary description used in list_siigo_tools.{"name": "list_products", "category": "products", "summary": "List products with pagination and filters"},