Skip to main content
Glama

Get the latest verification code

get_latest_otp
Read-only

Get the newest message sent to one address and the verification code (OTP) extracted from it. Returns found=false while nothing has arrived: wait about 5 seconds and call it again. When the message has no code, such as a verification link, otp is null; call get_message with message.id to read the body.

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": {
      "to": "<to>"
    },
    "name": "get_latest_otp"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesFull recipient address, e.g. signup-42@otp.example.com. Case-insensitive.
sinceNoOptional ISO 8601 time. Ignore messages received before it, e.g. the moment the test started.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

It discloses vital operational behavior beyond the annotations, specifically the retry/wait logic ('wait about 5 seconds') and the result status ('found=false' when nothing has arrived). This is crucial for agent flow control.

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

Conciseness4/5

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

The description is highly dense but logically structured, starting with the primary goal and then listing operational rules and fallback scenarios. It avoids unnecessary jargon while providing sufficient detail.

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

Completeness5/5

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

The definition covers all necessary decision points for an agent using this tool: when to retry, what to do if no message is found, and what to do if a message is found but lacks a code. It is maximally complete for this function.

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?

While the schema is comprehensive (100% coverage), the description adds value by providing practical context for the parameters, such as mentioning case-insensitivity for the 'to' field and the ISO 8601 format requirement for 'since'.

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?

The description is explicit about the tool's function: extracting the verification code (OTP) from the newest message. It differentiates itself from general message retrieval by focusing on extraction and reporting the `found=false` state.

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

Usage Guidelines5/5

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

The definition provides multiple critical usage guidelines, including the operational necessity to wait 5 seconds upon finding no message and explicit routing instructions to use `get_message` if the OTP is null.

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