Skip to main content
Glama
igorolv

mail-mcp-server

sync

sync
Read-only

Refresh a connection's local mail copy to include new messages, removals, moves, and read/flag states without altering the remote mailbox. Use when local mail is outdated or the user needs newer mail.

Instructions

Refresh one connection's local mail copy from the mail server, including new messages, removals, moves and read/flag states. The remote mailbox is not changed. Call when the user needs newer mail than the local copy. Runs in the background; the first sync can take a long time.

status=started means launched, not finished. For started or alreadyRunning, check syncStatus with the same connection while state is running; do not call sync again to check progress. lockedByOtherProcess means another process holds the local write lock and this call started no sync. That process may be an offline command; syncStatus reports sync runs only.

For refused, relay message to the user and do not retry: after a rejected sign-in, the user must fix the credentials and run mail-sync in a terminal.

Input Schema

NameRequiredDescriptionDefault
connectionYesConnection name from listConnections

Output Schema

NameRequiredDescriptionDefault
statusYesstarted (launched, not completed); alreadyRunning (a sync is already running in this process); lockedByOtherProcess (another process holds the local write lock, possibly for an offline command; this call started no sync); refused (see message). Use syncStatus for started/alreadyRunning; it reports sync runs, not offline command progress.
messageYesExplanation; relay it to the user when status is refused.
connectionYesConnection name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by documenting the async state machine: status=started means launched not finished, lockedByOtherProcess means no sync was started and may be an offline command, and refused requires user action in a terminal. The 'remote mailbox is not changed' clause reconciles with readOnlyHint=true and clarifies that only the local copy is written.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and scope in the first sentence, then organized into usage and state-handling sections with no filler. The dense state paragraph is justified by the tool's async behavior, though it could be tightened slightly for scanning.

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?

An output schema exists, so return values need no explanation, and the description still supplies the operational envelope: latency warning ('the first sync can take a long time'), background execution, per-status guidance, and a lock-conflict case. Nothing critical for correct invocation is missing.

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 coverage is 100% and the single parameter is already documented as 'Connection name from listConnections'. The description only refers to 'the same connection' when describing syncStatus polling, adding no new format or constraint information. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Refresh one connection's local mail copy from the mail server') and enumerates exactly what is propagated (new messages, removals, moves, read/flag states), plus an explicit non-effect ('The remote mailbox is not changed'). This clearly separates it from syncStatus, which only reports progress.

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 an explicit trigger ('Call when the user needs newer mail than the local copy'), an explicit anti-pattern ('do not call sync again to check progress' → use syncStatus with the same connection), and a failure-path instruction ('For refused, relay message to the user and do not retry'). No inference required.

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