Skip to main content
Glama

get_images

Retrieve filtered images in bulk from the Klaviyo MCP Server by specifying query filters, page size, and pagination cursor for efficient data handling.

Input Schema

NameRequiredDescriptionDefault
filterNoFilter query for images
page_cursorNoCursor for pagination
page_sizeNoNumber of images per page (1-100)

Input Schema (JSON Schema)

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

Implementation Reference

  • Handler function that calls klaviyoClient.get to fetch images from '/images/' endpoint with provided params, formats as JSON text content or error.
    async (params) => { try { const images = await klaviyoClient.get('/images/', params); return { content: [{ type: "text", text: JSON.stringify(images, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving images: ${error.message}` }], isError: true }; } },
  • Zod input schema defining optional parameters: filter (string), page_size (number 1-100), page_cursor (string).
    { filter: z.string().optional().describe("Filter query for images"), page_size: z.number().min(1).max(100).optional().describe("Number of images per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") },
  • Direct registration of the get_images tool on the MCP server, including name, schema, handler, and description.
    server.tool( "get_images", { filter: z.string().optional().describe("Filter query for images"), page_size: z.number().min(1).max(100).optional().describe("Number of images per page (1-100)"), page_cursor: z.string().optional().describe("Cursor for pagination") }, async (params) => { try { const images = await klaviyoClient.get('/images/', params); return { content: [{ type: "text", text: JSON.stringify(images, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving images: ${error.message}` }], isError: true }; } }, { description: "Get images from Klaviyo" } );
  • src/server.js:48-48 (registration)
    Top-level call to registerImageTools(server), which in turn registers the get_images tool.
    registerImageTools(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