Skip to main content
Glama

get_product_reviews

Retrieve product reviews from Klaviyo using filters and pagination for analyzing customer feedback and improving marketing strategies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoFilter query for product reviews
page_sizeNoNumber of reviews per page (1-100)
page_cursorNoCursor for pagination

Implementation Reference

  • Handler function that executes the get_product_reviews tool logic: fetches reviews using klaviyoClient and returns formatted JSON or error response.
    async (params) => { try { const reviews = await klaviyoClient.get('/product-reviews/', params); return { content: [{ type: "text", text: JSON.stringify(reviews, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving product reviews: ${error.message}` }], isError: true }; } },
  • Zod input schema defining optional parameters: filter, page_size, and page_cursor for the get_product_reviews tool.
    { filter: z.string().optional().describe("Filter query for product reviews"), page_size: z.number().min(1).max(100).optional().describe("Number of reviews per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") },
  • Direct registration of the get_product_reviews tool on the MCP server, including schema, handler, and description.
    "get_product_reviews", { filter: z.string().optional().describe("Filter query for product reviews"), page_size: z.number().min(1).max(100).optional().describe("Number of reviews per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") }, async (params) => { try { const reviews = await klaviyoClient.get('/product-reviews/', params); return { content: [{ type: "text", text: JSON.stringify(reviews, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving product reviews: ${error.message}` }], isError: true }; } }, { description: "Get product reviews from Klaviyo" } );
  • src/server.js:47-47 (registration)
    Top-level call to registerReviewTools, which includes the get_product_reviews tool registration.
    registerReviewTools(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