Skip to main content
Glama

get_available_numbers

Retrieve purchasable phone numbers by filtering country code, type, and location for VoiceAI integrations.

Instructions

Get available phone numbers for purchase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
country_codeNoCountry codeUS
number_typeNoNumber typelocal
search_patternNoSearch for numbers containing this pattern
localityNoLocality/city for local numbers

Implementation Reference

  • Handler logic for the 'get_available_numbers' tool. Constructs URL query parameters based on input arguments (country_code, number_type, search_pattern, locality) and sets the API endpoint to fetch available Twilio phone numbers.
    case 'get_available_numbers': const params = new URLSearchParams(); if (args.country_code) params.append('code', args.country_code); if (args.number_type) params.append('type', args.number_type); if (args.search_pattern) params.append('search', args.search_pattern); if (args.locality) params.append('locality', args.locality); url = `${this.baseUrl}/twilio/numbers/available?${params.toString()}`; break;
  • index.js:343-357 (registration)
    Tool registration including name, description, and input schema definition for 'get_available_numbers' in the list of available tools returned by ListToolsRequestSchema.
    { name: 'get_available_numbers', description: 'Get available phone numbers for purchase', inputSchema: { type: 'object', properties: { country_code: { type: 'string', description: 'Country code', default: 'US' }, number_type: { type: 'string', enum: ['local', 'tollfree', 'mobile'], description: 'Number type', default: 'local' }, search_pattern: { type: 'string', description: 'Search for numbers containing this pattern' }, locality: { type: 'string', description: 'Locality/city for local numbers' } }, required: [] } }, {
  • Input schema definition for the 'get_available_numbers' tool, specifying properties for country_code, number_type, search_pattern, and locality.
    inputSchema: { type: 'object', properties: { country_code: { type: 'string', description: 'Country code', default: 'US' }, number_type: { type: 'string', enum: ['local', 'tollfree', 'mobile'], description: 'Number type', default: 'local' }, search_pattern: { type: 'string', description: 'Search for numbers containing this pattern' }, locality: { type: 'string', description: 'Locality/city for local numbers' } }, required: [] } },

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/Business-On-Steroids/MCP-VoiceAI-WhiteLabel'

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