Skip to main content
Glama

synchronize_account

Trigger an immediate sync of an IMAP or Exchange account with its server, pushing queued changes such as moves or status updates so other clients see them right away.

Instructions

Force Mail.app to synchronize an account (or every account) with its IMAP / Exchange server right now. Equivalent to clicking the refresh button next to the account or selecting Mailbox → Synchronize.

Use after move_email, update_email_status, or manage_trash when downstream clients (iPhone, web mail, etc.) need to see the change immediately. Mail.app's natural sync cadence is "automatic" which can be several minutes — this collapses that to one IMAP push.

Implementation note:

Uses the synchronize with <account> AppleScript verb (per Mail.sdef: "Command to trigger synchronizing of an IMAP account with the server") rather than check for new mail. The latter is receive-only — it pulls new messages but does NOT push pending IMAP commands like queued moves / archives / flag changes. With check for new mail, archives done via move_email could sit in Mail.app's local cache for several minutes before reaching the IMAP server, leaving iPhone Mail (which reads IMAP directly) showing already-archived messages still in INBOX. synchronize with is the bidirectional verb that drains pending IMAP commands AND fetches new mail.

Mail.app's synchronize is potentially long-running. We wrap each invocation in with timeout of N seconds so the AppleScript returns promptly. When the timeout fires (error -1712) Mail.app keeps the sync running in the background — exactly the fire-and-forget semantics callers expect.

Args: account: Account name (e.g., "Gmail", "Work"). Omit to sync every configured account.

Returns: Confirmation string with the account(s) synced or queued.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description discloses that sync is potentially long-running, uses a timeout for fire-and-forget semantics, and explains the implementation detail about synchronize vs check for new mail. It does not mention network activity or UI impact, but overall is transparent.

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?

The description is well-structured with distinct sections but slightly verbose; still every sentence serves a purpose and it front-loads the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one parameter, no annotations, and the presence of an output schema (stated but not shown), the description adequately covers return value and usage context within the sibling tools suite.

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?

The only parameter 'account' is explained: account name (e.g., 'Gmail', 'Work') and that omitting it syncs every account, which adds meaning beyond the schema's anyOf/null/default.

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?

The description clearly states the tool forces Mail.app to synchronize an account with the server immediately, distinguishing it from related operations like move_email and check for new mail by explaining the AppleScript verb difference and use cases.

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?

Explicitly advises to use after move_email, update_email_status, or manage_trash for immediate push to downstream clients, and contrasts with the passive check for new mail, providing clear when-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/patrickfreyer/apple-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server