Skip to main content
Glama

get_catalogs

Retrieve catalogs with customizable pagination options using the MCP tool on the Klaviyo server. Manage catalog data efficiently with page size and cursor parameters for streamlined workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_cursorNoCursor for pagination
page_sizeNoNumber of catalogs per page (1-100)

Implementation Reference

  • Handler function that fetches catalogs from Klaviyo API endpoint '/catalogs/' using provided params, stringifies the result as JSON text content, or returns an error if the request fails.
    async (params) => { try { const catalogs = await klaviyoClient.get('/catalogs/', params); return { content: [{ type: "text", text: JSON.stringify(catalogs, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving catalogs: ${error.message}` }], isError: true }; } }, { description: "Get catalogs from Klaviyo" }
  • Zod schema validating optional input parameters for pagination: page_size (number 1-100) and page_cursor (string).
    { page_size: z.number().min(1).max(100).optional().describe("Number of catalogs per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") },
  • Direct registration of the 'get_catalogs' tool using server.tool(), including name, schema, handler, and description.
    "get_catalogs", { page_size: z.number().min(1).max(100).optional().describe("Number of catalogs per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") }, async (params) => { try { const catalogs = await klaviyoClient.get('/catalogs/', params); return { content: [{ type: "text", text: JSON.stringify(catalogs, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving catalogs: ${error.message}` }], isError: true }; } }, { description: "Get catalogs from Klaviyo" } );
  • src/server.js:41-41 (registration)
    Top-level call to registerCatalogTools on the MCP server, which registers the get_catalogs tool along with other catalog-related tools.
    registerCatalogTools(server);

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