retell_delete_llm
Remove a specific LLM configuration from the Retell AI voice and chat agent platform to manage agent settings.
Instructions
Delete a Retell LLM configuration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| llm_id | Yes | The LLM configuration ID to delete |
Implementation Reference
- src/index.ts:1211-1212 (handler)Handler implementation for the retell_delete_llm tool. Extracts llm_id from arguments and sends a DELETE request to the Retell API endpoint /delete-retell-llm/{llm_id} using the shared retellRequest helper.case "retell_delete_llm": return retellRequest(`/delete-retell-llm/${args.llm_id}`, "DELETE");
- src/index.ts:788-801 (registration)Tool registration entry in the tools array, which includes the name, description, and input schema. This object is returned by the ListTools handler.{ name: "retell_delete_llm", description: "Delete a Retell LLM configuration.", inputSchema: { type: "object", properties: { llm_id: { type: "string", description: "The LLM configuration ID to delete" } }, required: ["llm_id"] } },
- src/index.ts:23-57 (helper)Shared helper function retellRequest that performs authenticated HTTP requests to the Retell AI API. Handles authentication via RETELL_API_KEY env var, JSON serialization, error handling, and special cases like 204 No Content. Called by the tool handler with specific endpoint and method.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(); }