Skip to main content
Glama

Wait for code

wait_for_code

Wait for the next email that contains a verification code or a magic link and return it. Long-polls up to timeout_seconds (1-55, default 30) and returns {message:null, timeout:true} if nothing arrives. Use this right after you submit the address on a signup form. Next: use the code or link; to answer the sender, call send_message.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wait_for_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoOnly consider mail newer than this message id. Optional.
read_tokenNoThe read_token returned by create_inbox (or send it as Authorization: Bearer).
timeout_secondsNoHow long to wait for mail before giving up, in seconds (1-55). Default 30.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers: it discloses long-polling behavior, the timeout bound, and the exact failure return shape ({message:null, timeout:true}), which is precisely what an agent needs to handle a blocking call. It does not say whether a consumed message is marked read or what the success payload looks like.

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 sentences, zero filler, front-loaded with the purpose, then the timeout contract, then the workflow. Every sentence carries actionable information.

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?

No output schema exists, and the description covers the timeout case explicitly and implies success returns the email. The success payload shape and whether the message is consumed/marked read remain unstated, a minor gap for a blocking wait tool.

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?

Schema coverage is 100%, so after, read_token, and timeout_seconds are already documented. The description restates the timeout range/default and adds the timeout return shape, but adds no new meaning for 'after' or read_token beyond the schema. Baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ('wait for the next email that contains a verification code or a magic link and return it'), which an agent can immediately distinguish from passive siblings like list_messages or get_message.

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 explicit timing guidance ('right after you submit the address on a signup form') and routes to the next action ('to answer the sender, call send_message'). It stops short of a when-not rule (e.g., 'if you already have the message id, use get_message instead'), so it's strong but not exhaustive.

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