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);
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the tool's purpose and when to use it, but doesn't disclose important behavioral traits like whether this operation requires specific permissions, whether it's destructive to data (beyond cache), what happens during execution (e.g., temporary unavailability), or any rate limits. The description adds value but leaves significant gaps.

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 perfectly concise with two sentences that each earn their place. The first states the core action, the second provides usage context. No wasted words, well-structured, and front-loaded with the primary purpose.

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

Completeness3/5

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

Given the tool's moderate complexity (cache clearing operation with one parameter) and no annotations or output schema, the description provides adequate but incomplete coverage. It explains what the tool does and when to use it, but lacks details about behavioral implications, error conditions, or what happens after execution. For a tool that likely affects system state, more context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents the single 'path' parameter. The description doesn't add any parameter-specific information beyond what the schema provides (e.g., it doesn't explain path format requirements or cache location details). Baseline 3 is appropriate when the schema does all the parameter documentation work.

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 ('Clear') and target ('cached index for a repository'), providing a specific verb+resource combination. It distinguishes from siblings like 'index_repository' by focusing on cache removal rather than creation. However, it doesn't explicitly differentiate from all possible cache-related operations that might exist in other contexts.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('if cache becomes corrupted or you want to force a fresh index'), giving practical scenarios. It doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, though 'index_repository' is implied as a follow-up action.

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

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