Skip to main content
Glama

get_profile

Retrieve detailed customer profile data by specifying the profile ID, enabling efficient management of marketing automation and audience insights in Klaviyo.

Input Schema

NameRequiredDescriptionDefault
idYesID of the profile to retrieve

Input Schema (JSON Schema)

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

Implementation Reference

  • The async handler function for the 'get_profile' tool. Fetches the specific profile by ID from the Klaviyo API using klaviyoClient.get and returns a JSON-formatted response or an error message.
    async (params) => { try { const profile = await klaviyoClient.get(`/profiles/${params.id}/`); return { content: [{ type: "text", text: JSON.stringify(profile, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving profile: ${error.message}` }], isError: true }; } },
  • Zod input schema defining the required 'id' parameter as a string for the get_profile tool.
    { id: z.string().describe("ID of the profile to retrieve") },
  • Direct registration of the 'get_profile' tool via server.tool, specifying name, input schema, handler function, and description.
    "get_profile", { id: z.string().describe("ID of the profile to retrieve") }, async (params) => { try { const profile = await klaviyoClient.get(`/profiles/${params.id}/`); return { content: [{ type: "text", text: JSON.stringify(profile, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving profile: ${error.message}` }], isError: true }; } }, { description: "Get a specific profile from Klaviyo" } );
  • src/server.js:32-32 (registration)
    Top-level registration call to registerProfileTools(server), which includes the registration of the get_profile tool.
    registerProfileTools(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