create_number_order
Purchase virtual phone numbers for SMS verification across 500+ services in 50+ countries. Use with check_sms or wait_for_code to receive OTP codes.
Instructions
Purchase a virtual phone number for SMS verification. Returns order_id and phone_number. Use check_sms to poll for the verification code, or use wait_for_code to do it automatically.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Service code (e.g. "telegram", "whatsapp", "google") | |
| country | Yes | Country ISO code (e.g. "US", "GB", "RU") |
Implementation Reference
- src/tools.ts:464-485 (handler)The handleBuyNumber function executes the tool logic for create_number_order.
export async function handleBuyNumber( client: VirtualSMSClient, args: z.infer<typeof BuyNumberInput> ) { const order = await client.createOrder(args.service, args.country); return { content: [ { type: 'text' as const, text: JSON.stringify( { order_id: order.order_id, phone_number: order.phone_number, expires_at: order.expires_at, status: order.status, tip: 'Use check_sms to poll for the code, or cancel_order to refund.', }, null, 2 ), }, ], - src/tools.ts:12-15 (schema)The BuyNumberInput Zod schema defines the input parameters for the tool.
export const BuyNumberInput = z.object({ service: z.string().describe('Service code (e.g. "telegram", "whatsapp", "google")'), country: z.string().describe('Country ISO code (e.g. "US", "GB", "RU")'), }); - src/index.ts:98-101 (registration)Registration of the tool in the main switch statement.
case 'create_number_order': { const parsed = BuyNumberInput.parse(args); return await handleBuyNumber(client, parsed); }