Skip to main content
Glama

retell_get_agent

Retrieve configuration and details for a specific voice agent to manage conversation flows and agent settings.

Instructions

Retrieve the configuration and details of a specific voice agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe unique identifier of the agent

Implementation Reference

  • The handler logic for the 'retell_get_agent' tool within the executeTool switch statement. It constructs the API endpoint using the agent_id from input args and calls the retellRequest helper.
    case "retell_get_agent":
      return retellRequest(`/get-agent/${args.agent_id}`, "GET");
  • The tool schema definition including name, description, and inputSchema for validating the agent_id parameter.
    {
      name: "retell_get_agent",
      description: "Retrieve the configuration and details of a specific voice agent.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "The unique identifier of the agent"
          }
        },
        required: ["agent_id"]
      }
    },
  • src/index.ts:1283-1285 (registration)
    Registration of the tool listing handler that exposes all tools, including 'retell_get_agent', via the MCP protocol.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Core HTTP client helper function that performs authenticated API requests to Retell AI backend, used by all tool handlers including retell_get_agent.
    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-1293 (registration)
    MCP server request handler for tool execution, which dispatches to executeTool based on tool name, enabling 'retell_get_agent' execution.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const result = await executeTool(name, args as Record<string, unknown>);
        return {

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