Skip to main content
Glama

toggl_clear_cache

Clear cached Toggl Track data to ensure reports and timers reflect current information. Use this tool to refresh time tracking data when encountering outdated or inconsistent results.

Instructions

Clear all cached data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for 'toggl_clear_cache' tool. Clears the cache via CacheManager.clearCache(), resets the cacheWarmed flag, and returns a JSON success message.
    case 'toggl_clear_cache': {
      cache.clearCache();
      cacheWarmed = false;
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({ 
            success: true,
            message: 'Cache cleared successfully' 
          })
        }]
      };
    }
  • src/index.ts:374-382 (registration)
    Registers the 'toggl_clear_cache' tool in the tools array used for tool listing (ListToolsRequestSchema). Includes name, description, and empty input schema.
    {
      name: 'toggl_clear_cache',
      description: 'Clear all cached data',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
    }
  • CacheManager.clearCache() method implementation that clears all internal cache Maps (workspaces, projects, etc.) and resets performance statistics.
    clearCache(): void {
      this.workspaces.clear();
      this.projects.clear();
      this.clients.clear();
      this.tasks.clear();
      this.users.clear();
      this.tags.clear();
      this.stats = {
        hits: 0,
        misses: 0,
        lastReset: new Date()
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Clear all cached data' implies a destructive operation that removes stored data, but it doesn't specify what types of data are affected, whether this requires authentication, potential performance impacts, or if the action is reversible. This leaves significant gaps for a tool that modifies system state.

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 extremely concise at just three words ('Clear all cached data'), front-loading the essential action and target with zero wasted words. Every element earns its place, making it highly efficient.

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 destructive cache-clearing tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'cached data' encompasses, potential side effects, authentication requirements, or what happens after clearing (e.g., does it trigger re-caching?). Given the complexity of cache management and lack of structured data, more context is needed.

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 the schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to explain any parameters, which is appropriate. A baseline of 4 is given for zero-parameter tools when the description doesn't attempt to explain non-existent parameters.

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 'Clear all cached data' clearly states the action (clear) and target (all cached data), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'toggl_cache_stats' or 'toggl_warm_cache' that also relate to cache operations, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or how it relates to siblings like 'toggl_warm_cache' (which likely populates cache) or 'toggl_cache_stats' (which monitors cache).

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/verygoodplugins/mcp-toggl'

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