Skip to main content
Glama

OpenFactory

read_email_otp

Read a 2FA / one-time code from a Composio-connected Gmail.

Call this mid-test when a sign-in prompts for an emailed code: it polls the target user's recent Gmail (via Composio) for a matching message and returns {code}. Then type it with desktop_type. Requires an ACTIVE Composio Gmail connection for the target user.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_email_otp"
  }
}

Input Schema

NameRequiredDescriptionDefault
senderNoOptional sender filter, e.g. 'no-reply@knostra.ai' or a domain
api_keyNoMCP API key
for_userNoRead the OTP for THIS OpenFactory user (id or email) instead of the caller. Only honored for the system agent / super-admins — the Gmail connection may live under a different account than the calling identity.
code_patternNoRegex for the code; the first capture group (or whole match) is returned\b(\d{4,8})\b
connection_idNoOptional local Composio Gmail connection_id to read from
session_tokenNoSession token
within_secondsNoOnly consider emails newer than this many seconds
timeout_secondsNoHow long to poll for the email before giving up
subject_containsNoOptional substring expected in the subject, e.g. 'verification'

Output Schema

NameRequiredDescriptionDefault

No arguments

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 carries the full burden and does reasonably well: it discloses that the tool polls the target user's recent Gmail, returns a {code}, and requires an active Composio connection. It does not state what happens on timeout or how errors surface, leaving that to the output schema.

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 the purpose, then the trigger, then the follow-up and prerequisite. No filler or restated field documentation.

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 nine-parameter polling tool with an output schema, the description covers purpose, trigger, prerequisite, and return shape adequately. Remaining gaps around timeout/failure behavior are partially mitigated by the timeout_seconds and within_seconds parameters plus the output schema.

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% with nine well-documented parameters, so the structured schema already does the heavy lifting and a baseline of 3 applies. The description adds only the notion of a 'matching message' and a target user, without clarifying how sender, subject_contains, or code_pattern interact in the matching logic.

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 leads with a specific verb and resource: 'Read a 2FA / one-time code from a Composio-connected Gmail.' It scopes the source (Composio-connected Gmail) and the payload (the one-time code), which an agent can immediately distinguish from sibling tools like desktop_read_region or check_messages.

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?

It gives a concrete trigger ('Call this mid-test when a sign-in prompts for an emailed code') and names the follow-up action ('Then type it with desktop_type'), plus a prerequisite (an ACTIVE Composio Gmail connection). It stops short of explicit when-not guidance, e.g. what to do if the code arrives by SMS or if no email appears within the polling window.

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.