Skip to main content
Glama

Connect an IMAP mailbox

connect_imap_account

Connect a mailbox over IMAP with explicit credentials, instead of the OAuth providers (get_email_connect_url). profileId is required; get ids from list_profiles. The IMAP (and SMTP, when given) login is tested first and fails with 400 if it does not connect; a mailbox already connected also fails with 400. Monitoring starts from now: older mail is not read until trigger_email_sync is run with days. To change settings later use update_imap_account. Returns the account with its id.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "profileId": "<profileId>",
      "emailAddress": "<emailAddress>",
      "host": "<host>",
      "port": "<port>",
      "secure": "<secure>",
      "username": "<username>",
      "password": "<password>"
    },
    "name": "connect_imap_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesIMAP server hostname, e.g. imap.fastmail.com.
portYesIMAP server port, usually 993 with TLS or 143 without.
secureYestrue to connect over TLS (port 993), false for a plain connection.
passwordYesIMAP password or app password; stored encrypted and never returned.
smtpHostNoSMTP server hostname for sending replies; omit if the mailbox only receives.
smtpPortNoSMTP server port, e.g. 465 or 587.
usernameYesIMAP login username, often the email address.
profileIdYesThe profile this mailbox belongs to — required.
displayNameNoOptional label shown for the mailbox.
emailAddressYesThe mailbox's email address; cannot be changed later.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it tests the IMAP/SMTP login first and returns 400 on failure, returns 400 if the mailbox is already connected, and states that monitoring begins at connect time so older mail is not read. Annotations only cover the non-read-only/non-idempotent profile; the failure modes and post-connect behavior come entirely from the description.

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?

Front-loads the credential mode and the alternative, then packs prerequisites, failure conditions, monitoring semantics, and the follow-up tool into tight clauses with no filler. Every sentence carries operational weight.

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?

For a 10-parameter creation tool with no output schema, the description covers what an agent needs: required profile sourcing, validation/failure behavior, idempotency implications (already-connected mailbox fails), side effects (monitoring start, no historical mail), and the return value ('the account with its id').

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 per-field meaning is already handled by the schema, but the description adds workflow meaning for the key parameter by pointing to list_profiles as the source of profileId. It also implicitly establishes SMTP fields as optional ('and SMTP, when given'), which the schema only conveys structurally.

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?

Specific verb+resource ('Connect a mailbox over IMAP') with the credential mode stated ('explicit credentials'), and it explicitly names the sibling it is not (the OAuth path via get_email_connect_url). An agent can distinguish this from the OAuth connect flow without opening either 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?

Gives explicit when-to-use routing (IMAP credentials instead of OAuth providers), a prerequisite with its source ('profileId is required; get ids from list_profiles'), and redirects to the right sibling for later changes (update_imap_account) and for backfill (trigger_email_sync with days).

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.

Resources