Skip to main content
Glama

Get latest verification code

get_latest_code
Read-only

Fetches a recent one-time verification code from an alias's email within a set time window; call after triggering sign-up or login and retry if null.

Instructions

Return the most recent one-time verification code (OTP) received by an alias within the last since_minutes minutes, extracted from the email subject/body. Use right after triggering a sign-up or login email. Returns null code if none arrived yet; wait and call again.

Input Schema

NameRequiredDescriptionDefault
aliasNoAlias address. Omit to search all aliases.
since_minutesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description adds non-obvious behavior: extraction from subject/body, the null-result case, and the recommended retry after waiting. It doesn't mention rate limits or how it disambiguates when multiple codes exist beyond 'most recent'.

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 short sentences, front-loaded with what is returned, followed by when to call and the retry fallback. No filler or redundant restatement of the tool name.

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?

There is no output schema, and the description covers the return contract (extracted code, null when nothing arrived) as well as the timing constraint and retry pattern. For a two-parameter read tool with annotations present, nothing an agent needs to invoke it correctly is missing.

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 50%: `alias` is documented in the schema including the omit-to-search-all behavior. The description only restates `since_minutes` as a time window and omits the documented default of 15 and the 1440-minute cap, so it adds little beyond the schema.

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 ('Return the most recent one-time verification code (OTP)') and narrows the scope with the alias and since_minutes window plus the extraction source (email subject/body). This clearly separates it from sibling tools like recent_messages, which returns messages rather than extracted codes.

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 an explicit trigger ('Use right after triggering a sign-up or login email') and polling guidance ('Returns null code if none arrived yet; wait and call again'). It does not name an alternative sibling or state exclusions, which keeps it below a 5.

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