Skip to main content
Glama

Apumail — Email & SMS for AI Agents

wait_for_sms

Long-poll for a new SMS on a phone number. Returns immediately if a message with id > since already exists, otherwise blocks up to timeout seconds until one lands. The number + token come from provisioning a phone (a paid, account-gated feature — see the dashboard or POST /api/v1/phones). Ideal for catching a verification code texted to the number.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "number": "<number>",
      "token": "<token>"
    },
    "name": "wait_for_sms"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoReturn messages with id > this. Default 0 (any).
tokenYesThe phone token issued when the number was provisioned.
numberYesThe phone number in E.164, e.g. +14155550123.
timeoutNoMax seconds to block (1-300). Default 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does substantial work: it discloses the blocking/long-poll behavior, the immediate-return condition on an existing match, the timeout bound, and the paid, account-gated access requirement for obtaining credentials. It omits what is returned when the timeout elapses with no message, which is the main remaining behavioral unknown.

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?

Three tight sentences, front-loaded with the core mechanic before the return condition, the credential prerequisite, and the intended use case. Every sentence contributes and nothing is repeated from the schema.

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

Completeness3/5

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

With no output schema, the description should say what a caller gets back — especially on the timeout path, where an agent needs to know whether to expect an empty result, null, or an error. The call semantics, prerequisites, and timing are otherwise well covered for a 4-parameter tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds real meaning on top by explaining the provenance of `number` and `token` (issued at provisioning, tied to a paid feature) and framing `timeout` as the block duration and `since` as the immediate-return trigger. The added value is contextual rather than syntactic.

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?

Names a specific verb and resource ('Long-poll for a new SMS on a phone number') and immediately states the distinguishing mechanic — returns at once if a match exists, otherwise blocks. That blocking semantics separates it in practice from read_sms and extract_latest_sms_otp, though no sibling is named explicitly.

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?

Gives a concrete use case ('Ideal for catching a verification code texted to the number') and states the prerequisite that the number and token come from provisioning a phone, a paid account-gated feature. It stops short of naming alternatives or exclusions, so an agent must still infer that extract_latest_sms_otp or read_sms cover the non-blocking cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources