retell_get_conversation_flow
Retrieve conversation flow configurations to manage AI agent interactions and call handling settings.
Instructions
Retrieve a conversation flow configuration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conversation_flow_id | Yes | The conversation flow ID |
Implementation Reference
- src/index.ts:1217-1218 (handler)The handler case in the executeTool function that dispatches the tool call to the Retell API endpoint for retrieving a conversation flow.case "retell_get_conversation_flow": return retellRequest(`/get-conversation-flow/${args.conversation_flow_id}`, "GET");
- src/index.ts:829-838 (schema)Input schema definition for the tool, specifying the required conversation_flow_id parameter.inputSchema: { type: "object", properties: { conversation_flow_id: { type: "string", description: "The conversation flow ID" } }, required: ["conversation_flow_id"] }
- src/index.ts:826-839 (registration)The tool object in the tools array that registers the retell_get_conversation_flow tool with MCP server, including description and input schema.{ name: "retell_get_conversation_flow", description: "Retrieve a conversation flow configuration.", inputSchema: { type: "object", properties: { conversation_flow_id: { type: "string", description: "The conversation flow ID" } }, required: ["conversation_flow_id"] } },
- src/index.ts:23-57 (helper)Shared helper function that performs the HTTP request to the Retell API, handling authentication, JSON serialization, error handling, and response parsing. This is the core implementation logic for the tool.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(); }