Skip to main content
Glama

retell_list_chat_agents

View all available chat agents in your Retell AI account to manage conversation flows and agent configurations.

Instructions

List all chat agents in your account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for retell_list_chat_agents tool: makes a GET request to Retell's /list-chat-agents API endpoint using the retellRequest helper.
    case "retell_list_chat_agents": return retellRequest("/list-chat-agents", "GET");
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    { name: "retell_list_chat_agents", description: "List all chat agents in your account.", inputSchema: { type: "object", properties: {} } },
  • src/index.ts:1283-1285 (registration)
    Registers the handler for listing all tools, including retell_list_chat_agents via the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • src/index.ts:1287-1313 (registration)
    Registers the general tool execution handler that dispatches to executeTool based on tool name.
    // Register tool execution handler 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, }; } });
  • Generic helper function for making authenticated API requests to Retell AI, used by all tool handlers.
    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