Skip to main content
Glama

retell_list_chats

Retrieve chat session records from Retell AI's platform with optional filters and pagination to manage conversation history.

Instructions

List all chat sessions with optional filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results to return
pagination_keyNoPagination key for fetching next page

Implementation Reference

  • The execution handler for the 'retell_list_chats' tool. It calls the generic retellRequest helper function with a GET request to the Retell API endpoint '/list-chat' (note: input arguments like limit and pagination_key are not forwarded).
    case "retell_list_chats": return retellRequest("/list-chat", "GET");
  • src/index.ts:280-296 (registration)
    Tool registration entry in the MCP tools array, defining the name, description, and input schema for 'retell_list_chats'.
    { name: "retell_list_chats", description: "List all chat sessions with optional filtering.", inputSchema: { type: "object", properties: { limit: { type: "integer", description: "Number of results to return" }, pagination_key: { type: "string", description: "Pagination key for fetching next page" } } } },
  • Input schema definition for validating parameters (limit, pagination_key) of the 'retell_list_chats' tool.
    inputSchema: { type: "object", properties: { limit: { type: "integer", description: "Number of results to return" }, pagination_key: { type: "string", description: "Pagination key for fetching next page" } } }
  • Generic helper function retellRequest used by the handler to make authenticated HTTP requests to the Retell API.
    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