retell_create_conversation_flow
Design structured conversation flows with node-based configurations for AI voice and chat agents.
Instructions
Create a new conversation flow for structured, node-based conversation design.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the conversation flow | |
| nodes | No | Array of node configurations defining the flow | |
| edges | No | Array of edge configurations connecting nodes |
Implementation Reference
- src/index.ts:1215-1216 (handler)The handler case in the executeTool switch statement that invokes the Retell API to create a conversation flow by POSTing the arguments to /create-conversation-flow endpoint.case "retell_create_conversation_flow": return retellRequest("/create-conversation-flow", "POST", args);
- src/index.ts:807-823 (schema)Input schema defining parameters for creating a conversation flow: required 'name', optional 'nodes' and 'edges'.inputSchema: { type: "object", properties: { name: { type: "string", description: "Name for the conversation flow" }, nodes: { type: "array", description: "Array of node configurations defining the flow" }, edges: { type: "array", description: "Array of edge configurations connecting nodes" } }, required: ["name"]
- src/index.ts:804-825 (registration)Tool registration in the tools array, which is returned by the ListToolsRequestSchema handler to advertise available tools to MCP clients.{ name: "retell_create_conversation_flow", description: "Create a new conversation flow for structured, node-based conversation design.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name for the conversation flow" }, nodes: { type: "array", description: "Array of node configurations defining the flow" }, edges: { type: "array", description: "Array of edge configurations connecting nodes" } }, required: ["name"] } },
- src/index.ts:23-57 (helper)Generic helper function used by all Retell tools to make authenticated API requests to the Retell AI backend.async function retellRequest( endpoint: string, method: string = "GET", body?: Record<string, unknown> ): Promise<unknown> { const apiKey = getApiKey(); const headers: Record<string, string> = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", }; const options: RequestInit = { method, headers, }; if (body && method !== "GET") { options.body = JSON.stringify(body); } const response = await fetch(`${RETELL_API_BASE}${endpoint}`, options); if (!response.ok) { const errorText = await response.text(); throw new Error(`Retell API error (${response.status}): ${errorText}`); } // Handle 204 No Content if (response.status === 204) { return { success: true }; } return response.json(); }