Skip to main content
Glama

delete_profile

Remove customer profiles from Klaviyo by specifying the profile ID with this tool, ensuring accurate data management and compliance with user preferences.

Input Schema

NameRequiredDescriptionDefault
idYesID of the profile to delete

Input Schema (JSON Schema)

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

Implementation Reference

  • Handler function that executes the delete_profile tool by sending a DELETE request to the Klaviyo profiles endpoint using klaviyoClient.del.
    async (params) => { try { await klaviyoClient.del(`/profiles/${params.id}/`); return { content: [{ type: "text", text: "Profile deleted successfully" }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting profile: ${error.message}` }], isError: true }; } },
  • Input schema using Zod for the delete_profile tool, requiring a profile 'id' string.
    { id: z.string().describe("ID of the profile to delete") },
  • Registration of the delete_profile tool on the MCP server, including name, schema, handler, and description.
    server.tool( "delete_profile", { id: z.string().describe("ID of the profile to delete") }, async (params) => { try { await klaviyoClient.del(`/profiles/${params.id}/`); return { content: [{ type: "text", text: "Profile deleted successfully" }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting profile: ${error.message}` }], isError: true }; } }, { description: "Delete a profile from Klaviyo" } );
  • src/server.js:32-32 (registration)
    Invocation of registerProfileTools(server), which registers the delete_profile tool among others.
    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