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.

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/5.0
Behavior4/5

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

With no annotations, the description does real work: it discloses long-polling blocking behavior, the 1-55 second timeout with default 30, and the exact failure payload {message:null, timeout:true}. It stops short of describing the success payload (raw message vs. extracted code), authorization failure behavior, or what happens if multiple codes arrive.

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: purpose, mechanics with failure mode, then usage trigger. The most decision-relevant facts (what it waits for, how long, what happens on timeout) are front-loaded with no filler.

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 return shape plus the blocking semantics, which is most of what an agent needs. The success return shape is only implied by 'return it', leaving some ambiguity about whether the full message or just the code comes back.

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 description coverage is 100%, so timeout_seconds and read_token are already fully documented; the description's restatement of the range and default adds nothing new. The 'after' parameter (filtering to mail newer than a message id) is never mentioned in the description, which matters for repeated polling loops.

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?

States a specific verb and resource ('wait for the next email that contains a verification code or a magic link and return it'), which is far more informative than the title. It implicitly separates itself from get_message/list_messages by emphasizing the blocking wait for a verification code, but never names those siblings explicitly, so an agent must infer the boundary.

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?

'Use this right after you submit the address on a signup form' gives a clear, concrete trigger condition. It provides no exclusions or named alternatives (e.g., 'if you already know the message arrived, use get_message'), so the guidance is strong on when-to-use but silent on when-not.

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