Skip to main content
Glama
virtualsms-io

VirtualSMS MCP Server

Get Order Details

virtualsms_get_order
Read-onlyIdempotent

Retrieve full order details including status, phone number, service, country, timestamps, and received SMS code or text using the order ID. Use this to get the latest state of a virtual SMS verification order.

Instructions

Get the full details of a specific order, including status, phone number, service, country, timestamps, and any received SMS code/text. Use this when you have an order_id and need the latest state beyond what check_sms returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID to retrieve full details for

Implementation Reference

  • The handleGetOrder function that executes the 'virtualsms_get_order' tool logic. It calls client.getOrder(), extracts SMS messages and code, and returns a formatted JSON response.
    export async function handleGetOrder(
      client: VirtualSMSClient,
      args: z.infer<typeof GetOrderInput>
    ) {
      const order = await client.getOrder(args.order_id);
      const messages = (order.messages && order.messages.length > 0)
        ? order.messages
        : (order.sms_text || order.sms_code)
          ? [{ content: order.sms_text || order.sms_code || '', sender: undefined, received_at: undefined }]
          : [];
      const firstContent = messages[0]?.content;
      const code = order.sms_code || (firstContent ? extractCode(firstContent) : undefined);
      const out: Record<string, unknown> = {
        order_id: order.order_id,
        phone_number: order.phone_number,
        service: order.service,
        country: order.country,
        price: order.price,
        status: order.status,
        created_at: order.created_at,
        expires_at: order.expires_at,
      };
      if (messages.length > 0) out.messages = messages;
      if (code) {
        out.code = code;
        out.sms_code = code;
      }
      if (firstContent) out.sms_text = firstContent;
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(out, null, 2),
          },
        ],
      };
    }
  • GetOrderInput Zod schema defining the input for virtualsms_get_order: requires an order_id string.
    export const GetOrderInput = z.object({
      order_id: z.string().describe('Order ID to retrieve full details for'),
    });
  • src/tools.ts:402-426 (registration)
    Tool definition entry in TOOL_DEFINITIONS array registering virtualsms_get_order with name, title, description, inputSchema (order_id required), and annotations.
    {
      name: 'virtualsms_get_order',
      title: 'Get Order Details',
      description:
        'Get the full details of a specific order, including status, phone number, service, country, ' +
        'timestamps, and any received SMS code/text. Use this when you have an order_id and need the ' +
        'latest state beyond what check_sms returns.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          order_id: {
            type: 'string',
            description: 'Order ID to retrieve full details for',
          },
        },
        required: ['order_id'],
      },
      annotations: {
        title: 'Get Order Details',
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
    },
  • HTTP server route handler: parses args with GetOrderInput and calls handleGetOrder.
    case 'virtualsms_get_order': {
      const parsed = GetOrderInput.parse(args);
      return await handleGetOrder(client, parsed);
    }
  • Stdio server route handler: parses args with GetOrderInput and calls handleGetOrder.
    case 'virtualsms_get_order': {
      const parsed = GetOrderInput.parse(args);
      return await handleGetOrder(client, parsed);
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the tool as read-only, idempotent, and not destructive. The description adds valuable detail about the returned fields (status, phone number, service, country, timestamps, SMS code/text), which complements the annotations without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, efficiently front-loaded with the purpose and then a usage condition. There is no redundant information, and every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple input schema, comprehensive annotations, and the absence of an output schema, the description provides sufficient context for an AI agent to understand when and how to use the tool. It lists the key data fields returned, though a brief example of the output format would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has full coverage (100%) for the single parameter 'order_id', which is described adequately. The description does not add extra meaning beyond the schema, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves full order details including status, phone number, service, etc. It references a specific use case ('beyond what check_sms returns'), which distinguishes it from a related tool, though check_sms is not in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this when you have an order_id and need the latest state beyond what check_sms returns,' providing a clear condition for use. It does not, however, mention when not to use it or provide alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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