Skip to main content
Glama

Get Email Code

get_email_code
Read-only

Extracts a one-time password (OTP) candidate from a message in an existing inbox, with optional message selection, to retrieve verification codes during automated sign-up flows.

Instructions

Extract an OTP candidate from a received message in your existing inbox. Optionally pass message_id to select a message; use list_email_messages to inspect messages first. Pass inbox_id, capability and access_token from create_email_inbox. No additional charge. Poll at least 2 seconds apart; back off on 429/503. Pending, no_code or ambiguous does not confirm a usable OTP; external code acceptance is not guaranteed.

Input Schema

NameRequiredDescriptionDefault
inbox_idYesinbox_id parameter for get_email_code
capabilityYescapability parameter for get_email_code
message_idNomessage_id parameter for get_email_code
access_tokenNoUse the scoped access_token returned by create_email_inbox. Optional only for an existing provisioned private pilot connection.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

With readOnlyHint=true, destructiveHint=false and openWorldHint=false already established by annotations, the description adds important behavioral context: no additional charge, polling cadence, backoff behavior, and the caveat that pending, no_code or ambiguous does not confirm a usable OTP. It also warns that external code acceptance is not guaranteed, which is valuable for an extraction tool whose result may be unusable even after a successful call.

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 dense but front-loaded and every sentence carries operational value: message selection, credential source, rate-limit behavior, and OTP-status caveats. There is no filler or repetition 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?

The annotations cover the safety profile and an output schema exists, so the description does not need to explain return values. It still provides the missing operational context an agent needs: where credentials come from, how to choose a message, polling behavior, and what ambiguous extraction states mean.

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?

Schema coverage is 100%, so parameter names and types are already well documented, establishing a baseline of 3. The description adds meaningful provenance by saying inbox_id, capability and access_token come from create_email_inbox, and explains that message_id optionally selects a specific message; these details go beyond the generic schema descriptions.

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 states a specific verb and resource: extract an OTP candidate from a received message in an existing inbox. It distinguishes the tool from siblings by naming list_email_messages for inspection and create_email_inbox as the source of credentials, so an agent can identify the correct tool without opening the schema.

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?

It explicitly says to use list_email_messages to inspect messages first and optionally pass message_id to select one. It also names create_email_inbox as the source of inbox_id, capability and access_token, and gives polling guidance including minimum interval and backoff on 429/503.

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