Skip to main content
Glama

retell_get_chat_agent

Retrieve details of a specific chat agent to manage conversation flows and configure AI interactions for voice and chat platforms.

Instructions

Retrieve details of a specific chat agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe chat agent ID

Implementation Reference

  • Handler logic for retell_get_chat_agent tool: makes a GET request to Retell API endpoint `/get-chat-agent/${agent_id}` using the retellRequest helper.
    case "retell_get_chat_agent":
      return retellRequest(`/get-chat-agent/${args.agent_id}`, "GET");
  • Tool definition including name, description, and input schema (requires agent_id string). This is part of the tools array used for MCP tool listing.
    {
      name: "retell_get_chat_agent",
      description: "Retrieve details of a specific chat agent.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "The chat agent ID"
          }
        },
        required: ["agent_id"]
      }
    },
  • src/index.ts:1283-1285 (registration)
    MCP server handler for listing tools, which returns the tools array containing the retell_get_chat_agent definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Generic helper function for making authenticated HTTP requests to the Retell AI API, used by the tool handler.
    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();
    }

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