Skip to main content
Glama
VapiAI

Vapi MCP Server

Official
by VapiAI

list_calls

Retrieve a comprehensive list of all Vapi calls to review call history, analyze interactions, and manage records efficiently.

Instructions

Lists all Vapi calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'list_calls' tool. It calls vapiClient.calls.list({ limit: 10 }) and transforms the output using transformCallOutput.
    createToolHandler(async () => {
      const calls = await vapiClient.calls.list({ limit: 10 });
      return calls.map(transformCallOutput);
    })
  • Registration of the 'list_calls' tool via server.tool(), which registers it with name 'list_calls', description 'Lists all Vapi calls', an empty schema (no input params), and the handler.
    server.tool(
      'list_calls',
      'Lists all Vapi calls',
      {},
      createToolHandler(async () => {
        const calls = await vapiClient.calls.list({ limit: 10 });
        return calls.map(transformCallOutput);
      })
    );
  • The createToolHandler wrapper used by list_calls. It handles auth checking (valid token, auth flow), calls the actual handler, and wraps results in success/error responses.
    export function createToolHandler<T>(
      handler: (params: T) => Promise<any>
    ): (params: T) => Promise<ToolResponse> {
      return async (params: T) => {
        // Check auth first
        if (!hasValidToken()) {
          // Start auth if not already in progress
          if (!isAuthInProgress()) {
            try {
              await startAuthFlow();
            } catch (error) {
              // Ignore - we'll show the auth URL below
            }
          }
          const url = getAuthUrl();
          if (url) {
            return createAuthRequiredResponse(url);
          }
          return createErrorResponse('Authentication required. Please use vapi_login tool first.');
        }
    
        try {
          const result = await handler(params);
          return createSuccessResponse(result);
        } catch (error) {
          return createErrorResponse(error);
        }
      };
    }
  • The CallOutputSchema used by transformCallOutput to validate the structure of call data returned from list_calls.
    export const CallOutputSchema = BaseResponseSchema.extend({
      status: z.string(),
      endedReason: z.string().optional(),
      assistantId: z.string().optional(),
      phoneNumberId: z.string().optional(),
      customer: z
        .object({
          number: z.string(),
        })
        .optional(),
      scheduledAt: z.string().optional(),
    });
  • The registerAllTools function that calls registerCallTools, which in turn registers the list_calls tool on the MCP server.
    export const registerAllTools = (server: McpServer, vapiClient: VapiClient) => {
      registerAssistantTools(server, vapiClient);
      registerCallTools(server, vapiClient);
      registerPhoneNumberTools(server, vapiClient);
      registerToolTools(server, vapiClient);
    };
Behavior2/5

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

No annotations provided, so description carries full burden. It only states 'Lists all Vapi calls' with no details on return size, pagination, or rate limits, leaving behavioral traits unclear.

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?

Single sentence, no unnecessary words. Could be slightly more informative without bloat, but remains concise.

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?

Given no output schema, no parameters, and no annotations, the description is too minimal; it doesn't explain return format, pagination, or side effects for a list tool.

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

Parameters4/5

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

No parameters in schema; schema description coverage is 100%. Description adds no extra param info but baseline for 0 params is 4, and the description is adequate.

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

Purpose5/5

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

Description clearly states verb 'Lists' and resource 'Vapi calls', distinguishing it from siblings like get_call (single call) and list_assistants (different resource).

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?

No guidance on when to use this tool vs alternatives; e.g., no mention that get_call is for a specific call or that list_assistants lists different resources.

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/VapiAI/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server