retell_delete_chat_agent
Remove a chat agent from the Retell AI platform by specifying its ID to manage your deployed conversational AI resources.
Instructions
Delete a chat agent.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | The chat agent ID to delete |
Implementation Reference
- src/index.ts:1197-1198 (handler)The core handler logic for executing the 'retell_delete_chat_agent' tool. It extracts the agent_id from arguments and sends a DELETE request to the Retell API endpoint `/delete-chat-agent/{agent_id}` using the shared retellRequest helper.case "retell_delete_chat_agent": return retellRequest(`/delete-chat-agent/${args.agent_id}`, "DELETE");
- src/index.ts:686-699 (schema)The tool's schema definition in the tools array, including name, description, and inputSchema specifying the required 'agent_id' string parameter. This schema is used for tool discovery via ListToolsRequest.{ name: "retell_delete_chat_agent", description: "Delete a chat agent.", inputSchema: { type: "object", properties: { agent_id: { type: "string", description: "The chat agent ID to delete" } }, required: ["agent_id"] } },
- src/index.ts:1283-1285 (registration)Registration of the ListToolsRequestHandler which exposes the tools array (including this tool's schema) for MCP clients to discover available tools.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- src/index.ts:1288-1313 (registration)Registration of the CallToolRequestHandler which dispatches to executeTool based on tool name, enabling execution of this tool among others.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await executeTool(name, args as Record<string, unknown>); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Error: ${errorMessage}`, }, ], isError: true, }; } });