Skip to main content
Glama

get_collection_cache_health

Monitor cache performance and identify issues with offline browsing capability by checking health status and statistics for the collection cache system.

Instructions

Get health status and statistics for the collection cache system. This helps monitor cache performance and identify any issues with offline browsing capability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration including name, description, empty input schema, and handler lambda delegating to server.getCollectionCacheHealth()
    { tool: { name: "get_collection_cache_health", description: "Get health status and statistics for the collection cache system. This helps monitor cache performance and identify any issues with offline browsing capability.", inputSchema: { type: "object", properties: {} } }, handler: () => server.getCollectionCacheHealth() }
  • The MCP tool handler function, which calls the server's getCollectionCacheHealth method
    handler: () => server.getCollectionCacheHealth()
  • TypeScript interface definition for the server method called by the tool handler
    getCollectionCacheHealth(): Promise<any>;
  • Core cache statistics computation for collection cache health: item count, age, and validity status
    async getCacheStats(): Promise<{ itemCount: number; cacheAge: number; isValid: boolean }> { const cache = await this.loadCache(); if (!cache) { return { itemCount: 0, cacheAge: 0, isValid: false }; } return { itemCount: cache.items.length, cacheAge: Date.now() - cache.timestamp, isValid: Date.now() - cache.timestamp <= this.CACHE_TTL_MS }; }
  • Aggregated cache health stats from both index and collection caches, likely the data returned by getCollectionCacheHealth()
    async getCacheStats(): Promise<any> { const indexStats = this.indexCache.getCacheStats(); const cacheStats = await this.collectionCache.getCacheStats(); return { index: indexStats, collection: cacheStats }; }

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/DollhouseMCP/DollhouseMCP'

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