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
| Name | Required | Description | Default |
|---|---|---|---|
| sender | No | Optional sender filter, e.g. 'no-reply@knostra.ai' or a domain | |
| api_key | No | MCP API key | |
| for_user | No | Read 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_pattern | No | Regex for the code; the first capture group (or whole match) is returned | \b(\d{4,8})\b |
| connection_id | No | Optional local Composio Gmail connection_id to read from | |
| session_token | No | Session token | |
| within_seconds | No | Only consider emails newer than this many seconds | |
| timeout_seconds | No | How long to poll for the email before giving up | |
| subject_contains | No | Optional substring expected in the subject, e.g. 'verification' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||