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
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "refresh_cache"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/imap_mcp/imap_client.py:841-849 (handler)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 - src/imap_mcp/server.py:382-386 (registration)The MCP tool registration for refresh_cache.
make_tool( "refresh_cache", "Force refresh of email cache for all watched mailboxes", {}, ), - src/imap_mcp/server.py:654-655 (handler)The tool handler logic that calls the imap_client implementation.
elif name == "refresh_cache": return imap_client.refresh_cache()