Skip to main content
Glama
VapiAI

Vapi MCP Server

Official
by VapiAI

get_call

Retrieve detailed information about a specific call by providing its call ID. This tool accesses call data including status, duration, and transcripts through the Vapi API.

Instructions

Gets details of a specific call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callIdYesID of the call to get

Implementation Reference

  • The handler function for the 'get_call' tool. It receives data with a callId, calls vapiClient.calls.get(data.callId), and transforms the output via transformCallOutput.
    server.tool(
      'get_call',
      'Gets details of a specific call',
      GetCallInputSchema.shape,
      createToolHandler(async (data) => {
        const call = await vapiClient.calls.get(data.callId);
        return transformCallOutput(call);
      })
    );
  • The registerCallTools function that registers 'get_call' (and other call tools) on the MCP server using server.tool().
    export const registerCallTools = (
      server: McpServer,
      vapiClient: VapiClient
    ) => {
      server.tool(
        'list_calls',
        'Lists all Vapi calls',
        {},
        createToolHandler(async () => {
          const calls = await vapiClient.calls.list({ limit: 10 });
          return calls.map(transformCallOutput);
        })
      );
    
      server.tool(
        'create_call',
        'Creates a outbound call',
        CallInputSchema.shape,
        createToolHandler(async (data) => {
          const createCallDto = transformCallInput(data);
          const call = await vapiClient.calls.create(createCallDto);
          return transformCallOutput(call as unknown as Vapi.Call);
        })
      );
    
      server.tool(
        'get_call',
        'Gets details of a specific call',
        GetCallInputSchema.shape,
        createToolHandler(async (data) => {
          const call = await vapiClient.calls.get(data.callId);
          return transformCallOutput(call);
        })
      );
    };
  • The GetCallInputSchema Zod schema for the 'get_call' tool input, defining a required 'callId' string parameter.
    export const GetCallInputSchema = z.object({
      callId: z.string().describe('ID of the call to get'),
    });
  • The createToolHandler utility that wraps the handler with authentication checks and error handling.
    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 registerAllTools function that calls registerCallTools, which registers the 'get_call' tool.
    export const registerAllTools = (server: McpServer, vapiClient: VapiClient) => {
      registerAssistantTools(server, vapiClient);
      registerCallTools(server, vapiClient);
      registerPhoneNumberTools(server, vapiClient);
      registerToolTools(server, vapiClient);
    };
Behavior1/5

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

With no annotations, the description bears full burden for behavioral disclosure. It only says 'gets details' but does not specify whether it is read-only, what happens on missing IDs, or any authorization requirements. Lacks any behavioral context beyond the bare function.

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?

Single sentence, no extraneous words. Efficiently communicates the core purpose with no redundancy.

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?

No output schema is provided, and the description offers no details about return format, errors, or pagination. For a simple get tool, this may be sufficient, but the lack of any additional context (like example usage or notes) makes it incomplete for an agent to fully understand the behavior.

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% (callId described as 'ID of the call to get'). The description adds no extra meaning beyond the schema, so baseline of 3 is appropriate.

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?

The description clearly states the action and resource: 'Gets details of a specific call'. It distinguishes from sibling tools like list_calls (listing) and create_call (creating), making the purpose unambiguous.

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 is provided on when to use this tool versus alternatives. There is no mention of prerequisites, typical use cases, or what to do if the call ID is invalid.

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