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()

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