Skip to main content
Glama

retell_delete_agent

Remove a voice agent from your Retell AI account by specifying its agent ID to manage your agent inventory.

Instructions

Delete a voice agent from your account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to delete

Implementation Reference

  • The execution handler within the executeTool switch statement that handles the retell_delete_agent tool by calling the Retell API DELETE endpoint /delete-agent/{agent_id}.
    case "retell_delete_agent":
      return retellRequest(`/delete-agent/${args.agent_id}`, "DELETE");
  • The tool schema definition in the tools array, specifying the name, description, and input schema that requires an agent_id string.
    {
      name: "retell_delete_agent",
      description: "Delete a voice agent from your account.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "The agent ID to delete"
          }
        },
        required: ["agent_id"]
      }
    },
  • src/index.ts:1283-1285 (registration)
    MCP server registration for listing tools, which exposes the retell_delete_agent tool via the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Shared helper function retellRequest that performs authenticated API calls to Retell, used by the handler to execute the DELETE request.
    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();
    }
  • src/index.ts:1288-1313 (registration)
    MCP server handler for tool execution requests, which dispatches to executeTool based on the tool name (retell_delete_agent).
    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,
        };
      }
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Delete' implies a destructive mutation, but the description doesn't disclose critical behavioral traits: whether deletion is permanent or reversible, what permissions are required, if there are rate limits, or what happens to associated resources. This leaves significant gaps for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and resource. There is zero wasted language, making it immediately understandable without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is incomplete. It doesn't address the mutation's impact (e.g., permanence, side effects), error conditions, or return values, leaving the agent with insufficient context to use it safely and effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with the single parameter 'agent_id' well-documented in the schema. The description adds no additional parameter semantics beyond what's already in the structured schema, so it meets the baseline for high coverage without adding value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('a voice agent from your account'), making the purpose immediately understandable. However, it doesn't differentiate this from other delete operations like retell_delete_chat_agent or retell_delete_phone_number, which would require specifying this is specifically for voice agents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., agent must exist), exclusions (e.g., cannot delete active agents), or relationships with sibling tools like retell_list_agents or retell_get_agent for verification.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itsanamune/retellsimp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server