Skip to main content
Glama
virtualsms-io

VirtualSMS MCP Server

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
NameRequiredDescriptionDefault
order_idYesOrder ID to swap — must be in waiting/created status with no SMS received

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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'],
      },

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/virtualsms-io/mcp-server'

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