Skip to main content
Glama

ask_webflow_ai

Get answers about Webflow API functionality and usage directly from AI assistance. Ask questions to understand how to interact with Webflow sites, pages, and collections through the API.

Instructions

Ask Webflow AI about anything related to Webflow API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes

Implementation Reference

  • Registers the "ask_webflow_ai" MCP tool, defining its schema, description, and inline handler function that calls postChat and formats the response.
    export function registerAiChatTools(server: McpServer) { server.registerTool( "ask_webflow_ai", { title: "Ask Webflow AI", description: "Ask Webflow AI about anything related to Webflow API.", inputSchema: z.object({ message: z.string() }), }, async ({ message }) => { const result = await postChat(message); return { content: [{ type: "text", text: result }], }; } ); }
  • Core helper function that performs the HTTP POST request to Webflow's AI chat API endpoint, constructs the request body, and streams the response via streamToString.
    async function postChat(message: string) { const response = await fetch(`${BASE_URL}/api/fern-docs/search/v2/chat`, { method: "POST", headers: { "content-type": "application/json", "x-fern-host": X_FERN_HOST, }, body: JSON.stringify({ messages: [{ role: "user", parts: [{ type: "text", text: message }] }], conversationId: randomUUID(), url: BASE_URL, source: "mcp", }), }); const result = await streamToString(response); return result; }
  • Utility function to convert a streaming Fetch Response body into a complete string by reading chunks with TextDecoder.
    async function streamToString(response: Response) { const reader = response.body?.getReader(); if (!reader) { throw new Error("!reader"); } let result = ""; while (true) { const { done, value } = await reader.read(); if (done) break; // Convert the Uint8Array to a string and append result += new TextDecoder().decode(value); } return result; }
  • src/mcp.ts:48-48 (registration)
    Calls registerAiChatTools to include the ask_webflow_ai tool in the main MCP server registration.
    registerAiChatTools(server);
  • Zod input schema for the tool: requires a 'message' string.
    inputSchema: z.object({ message: z.string() }),

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/webflow/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server