retell_list_agents
Retrieve all voice agents from your Retell AI account to manage and deploy AI phone agents.
Instructions
List all voice agents in your Retell account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1173-1174 (handler)Specific handler case in the executeTool switch statement that implements the retell_list_agents tool by calling the Retell API's /list-agents endpoint via GET request.case "retell_list_agents": return retellRequest("/list-agents", "GET");
- src/index.ts:518-525 (schema)Tool schema definition for retell_list_agents, including name, description, and input schema (no required parameters). This is part of the static tools array registered with the MCP server.{ name: "retell_list_agents", description: "List all voice agents in your Retell account.", inputSchema: { type: "object", properties: {} } },
- src/index.ts:23-57 (helper)Generic helper function retellRequest used by all Retell tools, including retell_list_agents, to make authenticated API calls to Retell AI.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:1283-1285 (registration)MCP server registration for listing tools, which includes retell_list_agents via the static tools array.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });