Skip to main content
Glama
Soundhannes

IMAP MCP Server

by Soundhannes

refresh_cache

Force refresh email cache for all watched mailboxes to ensure up-to-date message data and synchronization.

Instructions

Force refresh of email cache for all watched mailboxes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the refresh_cache tool.
    def refresh_cache(self) -> bool:
        """Force refresh of email cache for all watched mailboxes."""
        if self.watcher and self.watcher.running:
            self.watcher.refresh()
        else:
            self.cache.clear()
            self.cache_timestamps.clear()
            self.get_cached_overview()
        return True
  • The MCP tool registration for refresh_cache.
    make_tool(
        "refresh_cache",
        "Force refresh of email cache for all watched mailboxes",
        {},
    ),
  • The tool handler logic that calls the imap_client implementation.
    elif name == "refresh_cache":
        return imap_client.refresh_cache()
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a write/mutation operation ('Force refresh') but doesn't disclose side effects (e.g., performance impact, temporary unavailability), authentication needs, rate limits, or what 'force' entails versus normal refresh cycles.

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?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and scope, making it immediately understandable without unnecessary elaboration.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is inadequate. It lacks details on what 'force refresh' entails operationally, expected outcomes, error conditions, or how it interacts with sibling tools like 'fetch_emails' or 'get_cached_overview'.

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 tool has zero parameters, and schema description coverage is 100% (empty schema). The description appropriately doesn't discuss parameters, and the baseline for zero parameters is 4, as there's no need to compensate for missing param documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Force refresh') and target resource ('email cache for all watched mailboxes'), making the tool's purpose understandable. It doesn't explicitly differentiate from siblings like 'get_cached_overview' or 'fetch_emails', but the 'force refresh' verb suggests an administrative/background operation rather than data retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing watched mailboxes), frequency considerations, or what triggers might warrant a forced refresh versus relying on automatic caching.

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/Soundhannes/IMAP-MCP'

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