Description
Tests TCP/TLS connection, authenticates with the IMAP server, and retrieves the server’s capability list. Use this tool to diagnose connection issues or verify account configuration.
This tool executes a full connection test including NOOP command to verify bidirectional communication.
Account identifier matching an environment variable configuration. Pattern: ^[A-Za-z0-9_-]{1,64}$
Response
Human-readable summary of the verification outcome. Example: "Account verification succeeded"
Overall verification status: "ok", "partial", or "failed".
Array of diagnostic issues encountered during verification. Error code: "invalid_input", "auth_failed", "not_found", "timeout", "conflict", or "internal".
Operation stage where issue occurred (e.g., "connect_authenticated", "noop", "capabilities").
Actionable error message.
Whether the operation can be retried.
Suggested follow-up action. Human-readable instruction for next step.
Recommended tool to call next.
Suggested arguments for the next tool call.
Account identifier that was verified.
Whether verification succeeded (true unless status="failed").
Round-trip latency to IMAP server in milliseconds.
Server connection details. IMAP server capabilities (max 256). Empty array if capabilities fetch failed. Common capabilities include: "IMAP4rev1", "IDLE", "MOVE", "UIDPLUS", "STARTTLS".
Execution metadata. Current UTC timestamp in ISO-8601 format with milliseconds.
Tool execution duration in milliseconds.
Examples
Request
Response - Success
Response - Authentication Failed
Response - Partial Success
{
"method" : "tools/call" ,
"params" : {
"name" : "imap_verify_account" ,
"arguments" : {
"account_id" : "default"
}
}
}
Error Cases
Invalid Account ID
{
"error" : {
"code" : "invalid_input" ,
"message" : "account_id must match pattern ^[A-Za-z0-9_-]{1,64}$" ,
"details" : {}
},
"meta" : {
"now_utc" : "2024-03-15T10:30:45.123Z" ,
"duration_ms" : 1
}
}
Account Not Found
{
"error" : {
"code" : "not_found" ,
"message" : "Account 'unknown' not found in configuration" ,
"details" : {}
},
"meta" : {
"now_utc" : "2024-03-15T10:30:45.123Z" ,
"duration_ms" : 2
}
}
Timeout Configuration
Connection timeouts are configurable via environment variables:
MAIL_IMAP_CONNECT_TIMEOUT_MS (default: 30000) - TCP/TLS connection timeout
MAIL_IMAP_GREETING_TIMEOUT_MS (default: 15000) - Server greeting timeout
MAIL_IMAP_SOCKET_TIMEOUT_MS (default: 300000) - Socket read/write timeout