Skip to main content
Glama

get_image

Retrieve specific images by their unique ID using the Klaviyo MCP Server tool, designed for managing marketing automation resources efficiently.

Input Schema

NameRequiredDescriptionDefault
idYesID of the image to retrieve

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "ID of the image to retrieve", "type": "string" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • Handler function that fetches a specific image from the Klaviyo API using the provided image ID and returns it as JSON or an error message.
    async (params) => { try { const image = await klaviyoClient.get(`/images/${params.id}/`); return { content: [{ type: "text", text: JSON.stringify(image, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving image: ${error.message}` }], isError: true }; } },
  • Zod schema defining the input parameter 'id' for the get_image tool.
    { id: z.string().describe("ID of the image to retrieve") },
  • Direct registration of the 'get_image' tool on the MCP server, including schema, handler, and description.
    server.tool( "get_image", { id: z.string().describe("ID of the image to retrieve") }, async (params) => { try { const image = await klaviyoClient.get(`/images/${params.id}/`); return { content: [{ type: "text", text: JSON.stringify(image, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving image: ${error.message}` }], isError: true }; } }, { description: "Get a specific image from Klaviyo" } );
  • src/server.js:48-48 (registration)
    Top-level call to registerImageTools during server setup, which includes registration of get_image.
    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