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)Handler case in the executeTool function that proxies the tool call to Retell's /create-conversation-flow API endpoint via POST request with input arguments.case "retell_create_conversation_flow": return retellRequest("/create-conversation-flow", "POST", args);
- src/index.ts:807-824 (schema)Input schema for the tool, specifying required 'name' and optional 'nodes' and 'edges' arrays.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)Registration of the tool in the 'tools' array, which is returned by the ListTools handler for MCP tool discovery.{ 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)Shared helper function that performs authenticated HTTP requests to the Retell API, used by all tool handlers including this one.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(); }