Skip to main content
Glama

retell_get_phone_number

Retrieve details for a specific phone number to verify availability and configuration for AI voice agents.

Instructions

Retrieve details of a specific phone number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phone_numberYesThe phone number in E.164 format to retrieve

Implementation Reference

  • The switch case handler that executes the tool logic by calling the Retell API's GET /get-phone-number/{phone_number} endpoint with URL-encoded phone number.
    case "retell_get_phone_number":
      return retellRequest(`/get-phone-number/${encodeURIComponent(args.phone_number as string)}`, "GET");
  • Input schema definition specifying the required 'phone_number' parameter as a string.
    inputSchema: {
      type: "object",
      properties: {
        phone_number: {
          type: "string",
          description: "The phone number in E.164 format to retrieve"
        }
      },
      required: ["phone_number"]
    }
  • src/index.ts:1283-1285 (registration)
    MCP registration of the ListToolsRequestHandler, which returns the full tools array including 'retell_get_phone_number'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/index.ts:1288-1293 (registration)
    MCP registration of the CallToolRequestHandler, which dispatches tool execution to executeTool based on name, invoking the handler for 'retell_get_phone_number'.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const result = await executeTool(name, args as Record<string, unknown>);
        return {
  • Core helper function for making authenticated API requests to Retell AI, used by the retell_get_phone_number handler and all other tools.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'retrieve details' which implies a read-only operation, but doesn't clarify authentication needs, rate limits, error handling, or what 'details' encompass (e.g., configuration, usage stats). This leaves significant gaps for a tool that likely interacts with sensitive resources.

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 that front-loads the core purpose without unnecessary words. It avoids redundancy and wastes no space, making it easy to parse quickly while conveying the essential action.

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 the lack of annotations and output schema, the description is incomplete for a tool that retrieves resource details. It doesn't explain what 'details' include (e.g., metadata, settings, status), potential response formats, or error conditions, leaving the agent under-informed about the tool's behavior and outputs.

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 input schema has 100% description coverage, clearly documenting the single required parameter 'phone_number' with its format (E.164). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.

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 action ('retrieve details') and resource ('specific phone number'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'retell_get_agent' or 'retell_get_call' beyond the resource type, nor does it specify what 'details' include, which prevents a perfect score.

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 doesn't mention prerequisites (e.g., needing an existing phone number), compare to 'retell_list_phone_numbers' for browsing, or specify use cases like checking configuration or status, leaving the agent with minimal context for selection.

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