Skip to main content
Glama
igorolv

mail-mcp-server

syncStatus

syncStatus
Read-onlyIdempotent

Check local progress or results of the current or last mail sync without starting a new sync or contacting the server, so you can decide whether to keep waiting.

Instructions

Read local progress or the result of the current or last sync; this does not start a sync or contact the mail server. state=running means still working; completed means the run finished; failed means the run stopped with an error; interrupted means the syncing process ended before finishing; never means no sync is recorded. phase is the stage reached; checkingLocal and checkingFolders can take minutes with no folder progress yet.

While running, other tools may see incomplete results. Check state to decide whether to keep waiting. The failed count is a count of messages: completed can still have failed>0. Inspect error and signInRejected for a failed run. If signInRejected is true, tell the user to fix credentials and run mail-sync in a terminal; repeated sync calls cannot recover it. Timestamps describe this run, not a guarantee that the local mail is current now.

Input Schema

NameRequiredDescriptionDefault
connectionYesConnection name from listConnections

Output Schema

NameRequiredDescriptionDefault
errorNoWhy the sync failed.
phaseNoStage reached, in order: checkingLocal (comparing saved messages with the index, offline; long after a run that did not complete), signingIn, checkingFolders (collecting changes from every folder), applyingChanges (moves and flag changes), downloading (removing and downloading folder by folder). For failed or interrupted, the stage where the run stopped. Absent for never and for runs recorded by an older version.
stateYesrunning (still working), completed (run finished, possibly with individual message failures), failed (run stopped with an error), interrupted (syncing process ended before finishing), or never (no recorded sync).
failedYesCount of new messages that failed to download or convert, all folders. May be nonzero even when state is completed.
foldersYesProgress per folder.
removedYesLocal messages removed because they are gone from the mailbox, all folders.
startedAtNoWhen the sync started.
connectionYesConnection name.
downloadedYesNew messages saved, all folders.
finishedAtNoWhen the sync ended; absent while running.
signInRejectedYesTrue when the mailbox rejected the sign-in; sync works again only after the user fixes the credentials and runs mail-sync in a terminal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: enumerates every state and phase value, warns that checkingLocal/checkingFolders can stall for minutes with no progress, notes other tools may see incomplete results while running, clarifies that completed can still have failed>0 (count is of messages, not runs), and explains the signInRejected recovery path. No contradiction with annotations — non-destructive read is consistent.

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?

Dense but front-loaded: the core read-only claim and the state/phase glossary lead, with edge-case handling following. Some sentences (timestamps caveat, phase latency note) are closely packed, but each conveys distinct operational information rather than repeating the schema.

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?

Output schema exists, yet the description still explains the semantics of the key return fields (state, phase, failed, error, signInRejected) that an agent needs in order to act. Combined with the latency and recovery guidance, nothing necessary for correct invocation or follow-up behavior 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?

Only one parameter (`connection`) and schema coverage is 100%, with the schema itself pointing at listConnections for valid values. The description adds no further parameter semantics, which is acceptable here since the schema fully covers it, but there is no value added beyond it.

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: reads progress/result of the current or last sync, and explicitly disclaims what it does not do (start a sync, contact the mail server). That negative clause is exactly what separates it from the sibling `sync` tool 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operational context: 'Check state to decide whether to keep waiting', and warns that repeated sync calls cannot recover a signInRejected failure — the agent should instead tell the user to fix credentials in a terminal. It stops short of explicitly naming `sync` as the tool that actually starts a sync, leaving that inference to the reader.

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