retell_delete_conversation_flow
Remove a conversation flow from the Retell AI platform by specifying its ID to manage agent configurations.
Instructions
Delete a conversation flow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conversation_flow_id | Yes | The conversation flow ID to delete |
Implementation Reference
- src/index.ts:1225-1226 (handler)The handler for the retell_delete_conversation_flow tool. It calls the generic retellRequest helper to perform a DELETE request to the Retell API endpoint /delete-conversation-flow/{conversation_flow_id}.case "retell_delete_conversation_flow": return retellRequest(`/delete-conversation-flow/${args.conversation_flow_id}`, "DELETE");
- src/index.ts:877-886 (schema)The input schema defining the required conversation_flow_id parameter for the tool.inputSchema: { type: "object", properties: { conversation_flow_id: { type: "string", description: "The conversation flow ID to delete" } }, required: ["conversation_flow_id"] }
- src/index.ts:874-887 (registration)The tool registration object added to the tools array, which is used by the MCP server for listing available tools.{ name: "retell_delete_conversation_flow", description: "Delete a conversation flow.", inputSchema: { type: "object", properties: { conversation_flow_id: { type: "string", description: "The conversation flow ID to delete" } }, required: ["conversation_flow_id"] } },
- src/index.ts:23-57 (helper)Generic 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(); }