Skip to main content
Glama

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
NameRequiredDescriptionDefault
pageNo
page_sizeNo
codeNo
nameNo

Implementation Reference

  • 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)
  • 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"},

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsfaccini/siigo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server