retell_list_chat_agents
View all 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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1191-1192 (handler)Handler case in executeTool function that invokes retellRequest to the /list-chat-agents API endpoint with GET method, executing the tool logic.case "retell_list_chat_agents": return retellRequest("/list-chat-agents", "GET");
- src/index.ts:656-663 (registration)Tool registration in the tools array, defining name, description, and empty input schema. This is returned by the ListTools handler.{ name: "retell_list_chat_agents", description: "List all chat agents in your account.", inputSchema: { type: "object", properties: {} } },
- src/index.ts:659-662 (schema)Input schema definition: empty object properties, no required inputs.inputSchema: { type: "object", properties: {} }
- src/index.ts:23-57 (helper)Generic helper function that makes authenticated HTTP requests to Retell AI API endpoints, used by all tool handlers including this one.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(); }