list_enabled_docs
Retrieve a list of all enabled documents along with their cache status using the tool. Optionally display detailed information with the verbose flag for better insight.
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)The main handler function for the 'list_enabled_docs' tool. It lists enabled documentation packages, showing their crawl status and optionally detailed information like start URL.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 (schema)Input schema definition for the 'list_enabled_docs' tool, specifying an 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:404-532 (registration)The ListToolsRequestSchema handler that registers the 'list_enabled_docs' tool among others by including it in the returned tools list.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ { name: "enable_doc", description: "Enable crawling for a specific doc", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the doc to enable" } }, required: ["name"] } }, { name: "disable_doc", description: "Disable crawling for a specific doc", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the doc to disable" } }, required: ["name"] } }, { name: "crawl_docs", description: "Start crawling enabled docs", inputSchema: { type: "object", properties: { force: { type: "boolean", description: "Whether to force re-crawl all docs, ignoring previous crawl records" } } } }, { name: "build_index", description: "Build search index for docs", inputSchema: { type: "object", properties: { force: { type: "boolean", description: "Whether to force rebuild index" } } } }, { name: "search_docs", description: "Search documentation", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query" }, max_results: { type: "number", description: "Maximum number of results", default: 3 }, doc_name: { type: "string", description: "Filter by document category" }, offset: { type: "number", description: "Number of results to skip", default: 0 } }, required: ["query"] } }, { name: "build_index", description: "Build search index for docs", inputSchema: { type: "object", properties: { force: { type: "boolean", description: "Whether to force rebuild index" } } } }, { 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 } } } }, { name: "list_all_docs", description: "List all available docs including disabled ones", inputSchema: { type: "object", properties: { verbose: { type: "boolean", description: "Whether to show detailed information", default: false } } } } ] }; });