get_available_numbers
Find purchasable phone numbers by specifying country code, type (local, tollfree, mobile), search pattern, or locality with this tool on VoiceAI-MCP-VAVicky.
Instructions
Get available phone numbers for purchase
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country_code | No | Country code | US |
| locality | No | Locality/city for local numbers | |
| number_type | No | Number type | local |
| search_pattern | No | Search for numbers containing this pattern |
Implementation Reference
- index.js:623-630 (handler)Handler implementation for the 'get_available_numbers' tool. Constructs URL query parameters based on input arguments (country_code, number_type, search_pattern, locality) and sets the endpoint to fetch available Twilio phone numbers from the backend API.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:346-354 (schema)Input schema definition for the 'get_available_numbers' tool, defining optional parameters for filtering available phone numbers.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: []
- index.js:343-356 (registration)Registration of the 'get_available_numbers' tool in the tools list returned by ListToolsRequestSchema handler, including name, description, and input schema.{ 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: [] } },