Skip to main content
Glama

get_product_reviews

Extract and manage product reviews using filter queries, pagination, and customizable page sizes to streamline feedback analysis and marketing strategies.

Input Schema

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

Implementation Reference

  • The handler function that executes the tool logic: fetches product reviews from Klaviyo API using the klaviyoClient and formats the response or error.
    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 }; } },
  • Input schema (Zod) for the tool parameters: optional filter, page_size (1-100), and page_cursor.
    { 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.
    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