Skip to main content
Glama

toggl_cache_stats

Retrieve cache statistics and performance metrics to monitor Toggl Track integration efficiency and optimize data retrieval.

Instructions

Get cache statistics and performance metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler case for 'toggl_cache_stats' that retrieves cache statistics via cache.getStats(), computes the cache hit rate, adds cache_warmed status, and returns a formatted JSON text response.
    case 'toggl_cache_stats': { const stats = cache.getStats(); const hitRate = stats.hits + stats.misses > 0 ? Math.round((stats.hits / (stats.hits + stats.misses)) * 100) : 0; return { content: [{ type: 'text', text: JSON.stringify({ ...stats, hit_rate: `${hitRate}%`, cache_warmed: cacheWarmed }, null, 2) }] }; }
  • src/index.ts:366-373 (registration)
    Tool registration entry in the tools array used for ListTools, defining name, description, and input schema (no required parameters).
    name: 'toggl_cache_stats', description: 'Get cache statistics and performance metrics', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • CacheManager.getStats() method providing the core statistics (sizes of cached maps and hit/miss counts) that power the toggl_cache_stats tool.
    getStats(): CacheStats { return { workspaces: this.workspaces.size, projects: this.projects.size, clients: this.clients.size, tasks: this.tasks.size, users: this.users.size, tags: this.tags.size, hits: this.stats.hits, misses: this.stats.misses, lastReset: this.stats.lastReset }; }

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