list_products
Retrieve and filter products from Siigo's inventory with pagination controls. Use code or name filters to find specific items in the product catalog.
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 core handler function for the "list_products" tool. It is decorated with @mcp.tool, accepts pagination and filter parameters, constructs query params, and calls the Siigo API /products endpoint.@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)Dynamic registration of the "list_products" tool in the lazy-loading tool function map used by discovery and execution meta-tools."list_products": products.list_products,
- Tool discovery schema entry providing metadata (name, category, summary) for the "list_products" tool, used by list_siigo_tools.{"name": "list_products", "category": "products", "summary": "List products with pagination and filters"},