Skip to main content
Glama

get_form

Retrieve detailed form data from the Klaviyo MCP Server by providing the specific form ID, enabling streamlined management of marketing automation workflows.

Input Schema

NameRequiredDescriptionDefault
idYesID of the form to retrieve

Input Schema (JSON Schema)

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

Implementation Reference

  • Handler function that executes the get_form tool: fetches the form by ID from Klaviyo API and returns JSON or error.
    async (params) => { try { const form = await klaviyoClient.get(`/forms/${params.id}/`); return { content: [{ type: "text", text: JSON.stringify(form, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving form: ${error.message}` }], isError: true }; } },
  • Input schema for get_form tool using Zod: requires 'id' as string.
    { id: z.string().describe("ID of the form to retrieve") },
  • Direct registration of the get_form tool via server.tool, including schema, handler, and description.
    server.tool( "get_form", { id: z.string().describe("ID of the form to retrieve") }, async (params) => { try { const form = await klaviyoClient.get(`/forms/${params.id}/`); return { content: [{ type: "text", text: JSON.stringify(form, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving form: ${error.message}` }], isError: true }; } }, { description: "Get a specific form from Klaviyo" } );
  • src/server.js:46-46 (registration)
    Top-level registration call that invokes registerFormTools to set up the get_form tool among others.
    registerFormTools(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