Skip to main content
Glama
little2512
by little2512

get_cache_stats

Retrieve cache statistics to monitor performance and optimize document processing efficiency in Word document analysis workflows.

Instructions

获取缓存统计信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the logic for the get_cache_stats tool. It retrieves statistics from the cacheManager and documentIndexer, formats them into a text response, and returns it in the expected MCP format.
    case "get_cache_stats": { const documentStats = await cacheManager.getStats(); const indexStats = documentIndexer.getStats(); const statsText = `缓存统计信息:\n\n` + `文档缓存:\n` + `- 缓存文件数: ${documentStats.totalCached}\n` + `- 总缓存大小: ${(documentStats.totalSize / 1024 / 1024).toFixed(2)} MB\n\n` + `全文索引:\n` + `- 索引词汇数: ${indexStats.totalWords}\n` + `- 索引文档数: ${indexStats.totalDocuments}\n` + `- 最后更新: ${new Date(indexStats.lastUpdated).toLocaleString()}`; return { content: [ { type: "text", text: statsText } ] }; }
  • server.js:542-549 (registration)
    The tool registration entry in the tools array passed to server.setTools(), defining the name, description, and input schema (empty object).
    { name: "get_cache_stats", description: "获取缓存统计信息", inputSchema: { type: "object", properties: {} } },
  • The input schema definition for the get_cache_stats tool, specifying an empty object (no parameters required).
    inputSchema: { type: "object", properties: {} }

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/little2512/word-doc-mcp'

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