Skip to main content
Glama

retell_list_calls

List and filter voice or chat agent calls by agent, status, time range, or type with pagination support for efficient call management.

Instructions

List and filter calls with pagination support. Can filter by agent, status, time range, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_criteriaNoOptional filter criteria
limitNoNumber of results to return (default: 50, max: 1000)
pagination_keyNoPagination key from previous response for fetching next page
sort_orderNoSort order by start timestamp

Implementation Reference

  • Handler case for retell_list_calls tool: Makes a POST request to the Retell API endpoint /v2/list-calls using the provided arguments.
    case "retell_list_calls":
      return retellRequest("/v2/list-calls", "POST", args);
  • Input schema definition for the retell_list_calls tool, specifying parameters like filter_criteria, limit, pagination_key, and sort_order.
    {
      name: "retell_list_calls",
      description: "List and filter calls with pagination support. Can filter by agent, status, time range, and more.",
      inputSchema: {
        type: "object",
        properties: {
          filter_criteria: {
            type: "object",
            description: "Optional filter criteria",
            properties: {
              agent_id: { type: "array", items: { type: "string" }, description: "Filter by agent IDs" },
              call_type: { type: "array", items: { type: "string" }, description: "Filter by call type (phone_call, web_call)" },
              call_status: { type: "array", items: { type: "string" }, description: "Filter by status (registered, ongoing, ended, error)" },
              start_timestamp_gte: { type: "integer", description: "Filter calls starting after this Unix timestamp" },
              start_timestamp_lte: { type: "integer", description: "Filter calls starting before this Unix timestamp" }
            }
          },
          limit: {
            type: "integer",
            description: "Number of results to return (default: 50, max: 1000)"
          },
          pagination_key: {
            type: "string",
            description: "Pagination key from previous response for fetching next page"
          },
          sort_order: {
            type: "string",
            enum: ["ascending", "descending"],
            description: "Sort order by start timestamp"
          }
        }
      }
    },
  • src/index.ts:1283-1285 (registration)
    Registers the list of available tools, including retell_list_calls, via the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/index.ts:1287-1313 (registration)
    Registers the general tool execution handler (CallToolRequestSchema) which dispatches to executeTool based on tool name, handling retell_list_calls.
    // 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 retellRequest used by retell_list_calls handler 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();
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'pagination support' and filtering, which is useful, but lacks critical details: it doesn't specify if this is a read-only operation, potential rate limits, authentication requirements, or what happens with large datasets. The description is too vague for a tool with multiple parameters and no annotations.

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

Conciseness4/5

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

The description is concise and front-loaded, stating the core purpose in the first clause. It uses two sentences efficiently, with no wasted words. However, it could be slightly more structured by explicitly separating listing from filtering aspects.

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

Completeness3/5

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

Given the complexity (4 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It covers basic functionality but misses behavioral traits, usage context, and output details. It's adequate as a minimal overview but lacks depth for effective tool selection and invocation.

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?

The description adds minimal value beyond the input schema, which has 100% coverage. It mentions filtering by 'agent, status, time range, and more,' which loosely maps to 'filter_criteria' parameters, but doesn't explain syntax, defaults, or interactions. With high schema coverage, the baseline is 3, as the schema already documents parameters well.

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 tool's purpose: 'List and filter calls with pagination support.' It specifies the verb ('list and filter'), resource ('calls'), and key capability ('pagination support'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'retell_get_call' or 'retell_list_chats', which slightly reduces clarity.

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 provides no guidance on when to use this tool versus alternatives. It mentions filtering capabilities but doesn't specify scenarios, prerequisites, or exclusions. For example, it doesn't clarify if this is for bulk retrieval versus single-call lookups or how it compares to 'retell_get_call' for individual calls.

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