Skip to main content
Glama

Apumail — Email & SMS for AI Agents

extract_latest_otp

Return just the OTP / verification code from the most recent mail on this inbox, if one was detected. Returns {otp, source_mail_id, from, subject} or {otp: null} if no mail / no code detected. Convenience tool — the same data is on every read_inbox response.

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": {
      "address": "<address>",
      "token": "<token>"
    },
    "name": "extract_latest_otp"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesThe inbox token.
addressYesThe inbox address.

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 does useful work by disclosing the exact return shape and the null fallback when no mail or code is detected. It does not explicitly state read-only behavior or auth requirements, though retrieval is strongly implied by 'Return just the OTP'.

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 three short sentences, front-loads the core purpose, and then adds the return shape and convenience note without unnecessary wording.

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?

For a simple two-parameter retrieval tool, the description covers purpose, return shape, null behavior, and relationship to read_inbox. It lacks explicit read-only or auth context, but the tool complexity is low and the schema covers the parameters.

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 the input schema already documents the token and address parameters. The description adds no additional parameter meaning beyond what the schema provides, making the baseline 3 appropriate.

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: returning the OTP/verification code from the most recent mail on the inbox. It also explicitly distinguishes itself from read_inbox by noting this is a convenience tool and the same data appears on every read_inbox response.

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 clearly implies when to use this tool versus read_inbox by saying the data is available on every read_inbox response. However, it does not explicitly describe when not to use it or name the SMS OTP sibling as an alternative for SMS codes.

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