list_enabled_docs
Retrieve all active documents with their cache status to manage and monitor available documentation resources.
Instructions
List all enabled docs with their cache status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verbose | No | Whether to show detailed information |
Implementation Reference
- src/index.ts:585-606 (handler)Handler for the list_enabled_docs tool. Ensures config exists, filters enabled docs from the docs array using docConfig, reads crawl status from config, formats output based on verbose flag, and returns text content listing enabled docs with cache status.case "list_enabled_docs": { // Ensure config file exists before reading it await ensureConfigFile(); const verbose = Boolean(request.params.arguments?.verbose); const config = await fs.readJson(configPath); const enabledDocs = docs.filter(doc => docConfig[doc.name]); const result = enabledDocs.map(doc => { const crawledAt = config.crawledDocs?.[doc.name] || "Not crawled"; return verbose ? `${doc.name} (Enabled)\n Start URL: ${doc.crawlerStart}\n Last crawled: ${crawledAt}` : `${doc.name} [${crawledAt === "Not crawled" ? "Not cached" : "Cached"}]`; }); return { content: [{ type: "text", text: result.join("\n") || "No enabled docs found" }] }; }
- src/index.ts:502-515 (registration)Registration of the list_enabled_docs tool in the ListToolsRequestSchema handler, including name, description, and input schema for optional verbose boolean parameter.{ name: "list_enabled_docs", description: "List all enabled docs with their cache status", inputSchema: { type: "object", properties: { verbose: { type: "boolean", description: "Whether to show detailed information", default: false } } } },
- src/index.ts:505-514 (schema)Input schema definition for the list_enabled_docs tool, defining an optional verbose boolean property.inputSchema: { type: "object", properties: { verbose: { type: "boolean", description: "Whether to show detailed information", default: false } } }