Skip to main content
Glama
VapiAI

Vapi MCP Server

Official
by VapiAI

get_phone_number

Retrieve details of a specific phone number by providing its ID. Access phone number data through the Vapi MCP Server.

Instructions

Gets details of a specific phone number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phoneNumberIdYesID of the phone number to get

Implementation Reference

  • The handler function for the 'get_phone_number' tool. Calls vapiClient.phoneNumbers.get(phoneNumberId) and transforms the output.
    createToolHandler(async (data) => {
      const phoneNumberId = data.phoneNumberId;
      const phoneNumber = await vapiClient.phoneNumbers.get(phoneNumberId);
      return transformPhoneNumberOutput(phoneNumber);
    })
  • The Zod schema defining the input: phoneNumberId (string).
    export const GetPhoneNumberInputSchema = z.object({
      phoneNumberId: z.string().describe('ID of the phone number to get'),
    });
  • Registration of the 'get_phone_number' tool via server.tool() inside registerPhoneNumberTools.
    server.tool(
      'get_phone_number',
      'Gets details of a specific phone number',
      GetPhoneNumberInputSchema.shape,
      createToolHandler(async (data) => {
        const phoneNumberId = data.phoneNumberId;
        const phoneNumber = await vapiClient.phoneNumbers.get(phoneNumberId);
        return transformPhoneNumberOutput(phoneNumber);
      })
    );
  • registerPhoneNumberTools is called from registerAllTools to wire up the tool on the MCP server.
    export const registerAllTools = (server: McpServer, vapiClient: VapiClient) => {
      registerAssistantTools(server, vapiClient);
      registerCallTools(server, vapiClient);
      registerPhoneNumberTools(server, vapiClient);
      registerToolTools(server, vapiClient);
  • transformPhoneNumberOutput helper used to convert the API response into the output schema format.
    export function transformPhoneNumberOutput(
      phoneNumber: any
    ): z.infer<typeof PhoneNumberOutputSchema> {
      return {
        id: phoneNumber.id,
        name: phoneNumber.name,
        createdAt: phoneNumber.createdAt,
        updatedAt: phoneNumber.updatedAt,
        phoneNumber: phoneNumber.number,
        status: phoneNumber.status,
      };
    }
Behavior2/5

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

Description says 'Gets details' implying a read-only operation, but no annotations are provided to confirm safety. It does not disclose any behavioral traits such as rate limits, authentication requirements, or side effects.

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

Conciseness3/5

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

The description is a single sentence, which is concise but lacks structure. It efficiently communicates the core purpose but does not earn its place with extra detail.

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?

Without an output schema, the description should at least hint at the return value (e.g., 'returns phone number details'). It does not, making it incomplete for a simple read tool.

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 coverage is 100% (phoneNumberId described adequately). The description adds no additional meaning beyond the schema; baseline 3 is appropriate.

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 'Gets details' with a specific resource ('phone number'), distinguishing it from sibling tools like list_phone_numbers (list) and create_phone_number (create). However, it lacks specificity about what 'details' include.

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 versus siblings. For example, it doesn't mention that list_phone_numbers should be used to get all numbers, and this is for a single number by ID.

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