Skip to main content
Glama
transparentlyok

MCP Context Manager

clear_cache

Clear cached repository index to resolve corruption issues or force a fresh index for accurate code navigation and retrieval.

Instructions

Clear the cached index for a repository. Useful if cache becomes corrupted or you want to force a fresh index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to repository root. Default: process.cwd()

Implementation Reference

  • The clearCache method inside Indexer class which removes the cache file for a given repository path.
    async clearCache(rootPath: string): Promise<void> {
      try {
        const cachePath = this.getCachePath(rootPath);
        await fs.unlink(cachePath);
        console.error('Cache cleared');
      } catch (error) {
        // Cache file doesn't exist or can't be deleted
  • src/index.ts:387-389 (registration)
    Tool execution handler in the main MCP server loop.
    case 'clear_cache': {
      const path = (args as any).path || process.cwd();
      await indexer.clearCache(path);

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/transparentlyok/mcp-context-manager'

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