Skip to main content
Glama

get_catalog_items

Retrieve catalog items from the Klaviyo MCP Server using a catalog ID, filter query, pagination cursor, and page size. Efficiently manage and access product data for marketing automation.

Input Schema

NameRequiredDescriptionDefault
catalog_idYesID of the catalog
filterNoFilter query for catalog items
page_cursorNoCursor for pagination
page_sizeNoNumber of items per page (1-100)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "catalog_id": { "description": "ID of the catalog", "type": "string" }, "filter": { "description": "Filter query for catalog items", "type": "string" }, "page_cursor": { "description": "Cursor for pagination", "type": "string" }, "page_size": { "description": "Number of items per page (1-100)", "maximum": 100, "minimum": 1, "type": "number" } }, "required": [ "catalog_id" ], "type": "object" }

Implementation Reference

  • Handler function for the get_catalog_items tool. It extracts catalog_id, calls klaviyoClient.get to fetch items with query params, and returns JSON stringified response or error.
    async (params) => { try { const { catalog_id, ...queryParams } = params; const items = await klaviyoClient.get(`/catalogs/${catalog_id}/items/`, queryParams); return { content: [{ type: "text", text: JSON.stringify(items, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving catalog items: ${error.message}` }], isError: true }; } },
  • Input schema using Zod for validating parameters: catalog_id (required string), filter (optional string), page_size (optional number 1-100), page_cursor (optional string).
    { catalog_id: z.string().describe("ID of the catalog"), filter: z.string().optional().describe("Filter query for catalog items"), page_size: z.number().min(1).max(100).optional().describe("Number of items per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") },
  • Registration of the get_catalog_items tool on the MCP server, including name, input schema, handler function, and description.
    server.tool( "get_catalog_items", { catalog_id: z.string().describe("ID of the catalog"), filter: z.string().optional().describe("Filter query for catalog items"), page_size: z.number().min(1).max(100).optional().describe("Number of items per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") }, async (params) => { try { const { catalog_id, ...queryParams } = params; const items = await klaviyoClient.get(`/catalogs/${catalog_id}/items/`, queryParams); return { content: [{ type: "text", text: JSON.stringify(items, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving catalog items: ${error.message}` }], isError: true }; } }, { description: "Get items from a catalog in Klaviyo" } );

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/ivan-rivera-projects/Klaviyo-MCP-Server-Enhanced'

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