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();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'optional filtering' but doesn't clarify what filtering options exist, whether this is a read-only operation, if there are rate limits, or what the output format looks like. The description is too vague to provide adequate behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple list operation and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a list tool with no annotations and no output schema, the description is insufficient. It doesn't explain what constitutes a 'chat session', what fields are returned, or how filtering works. With 2 parameters and many sibling tools, more context is needed for the agent to use this effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (limit and pagination_key). The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all chat sessions'), making the purpose understandable. However, it doesn't distinguish this tool from sibling list tools like 'retell_list_calls' or 'retell_list_chat_agents', which reduces differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'optional filtering' but provides no guidance on when to use this tool versus alternatives. With many sibling list tools available, there's no indication of what makes this specific to chat sessions or when to choose it over other listing tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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