swap_phone_number
Replace a non-functional phone number on an existing VirtualSMS order with a new number for the same service and country at no extra cost when SMS messages aren't being received.
Instructions
Swap a phone number on an existing order. Gets a new number for the same service and country without additional charge. Use when the current number isn't receiving SMS.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | Order ID to swap — must be in waiting/created status with no SMS received |
Implementation Reference
- src/tools.ts:526-539 (handler)The handleSwapNumber function executes the tool logic by calling client.swapNumber.
export async function handleSwapNumber( client: VirtualSMSClient, args: z.infer<typeof SwapNumberInput> ) { const result = await client.swapNumber(args.order_id); return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2), }, ], }; } - src/tools.ts:25-27 (schema)Input validation schema for the swap_phone_number tool.
export const SwapNumberInput = z.object({ order_id: z.string().describe('Order ID to swap — must be in waiting/created status with no SMS received'), }); - src/tools.ts:323-338 (registration)Tool definition and registration for swap_phone_number.
{ name: 'swap_phone_number', title: 'Swap Phone Number', description: 'Swap a phone number on an existing order. Gets a new number for the same service and country without additional charge. ' + 'Use when the current number isn\'t receiving SMS.', inputSchema: { type: 'object' as const, properties: { order_id: { type: 'string', description: 'Order ID to swap — must be in waiting/created status with no SMS received', }, }, required: ['order_id'], },