get_coverage_analysis
Analyze solution space completeness for trees to identify unexplored branches, unvalidated splits, and suggest next research steps.
Instructions
Analyze the completeness of solution space exploration for a tree. Shows unexplored branches, unvalidated splits, and suggestions for next steps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| treeId | Yes | ID of the tree to analyze |
Implementation Reference
- src/research-tree.ts:494-525 (handler)Core handler function implementing the get_coverage_analysis tool logic. Computes metrics like total tiles, leaf count, unexplored branches, validation status, and generates exploration suggestions.getCoverageAnalysis(treeId: string): any { const tree = this.trees.get(treeId); if (!tree) { throw new Error(`Tree ${treeId} not found`); } const allTiles = this.getTilesInTree(tree.rootTileId); const leaves = allTiles.filter((t) => t.isLeaf); const unexplored = this.getUnexploredTiles(treeId); const unvalidated = this.getUnvalidatedSplits(treeId); const validated = allTiles.filter((t) => t.isMECE === true); const evaluated = leaves.filter((t) => t.evaluation); // Calculate depth const maxDepth = this.calculateMaxDepth(tree.rootTileId); return { totalTiles: allTiles.length, leafTiles: leaves.length, unexploredBranches: unexplored.length, validatedSplits: validated.length, unvalidatedSplits: unvalidated.length, evaluatedLeaves: evaluated.length, unevaluatedLeaves: leaves.length - evaluated.length, maxDepth, coveragePercentage: allTiles.length > 1 ? ((validated.length / (allTiles.length - leaves.length)) * 100).toFixed(1) : 0, explorationSuggestions: this.generateSuggestions(unexplored, unvalidated, leaves), }; }
- src/index.ts:324-333 (schema)Input schema for the get_coverage_analysis tool, requiring a treeId parameter.inputSchema: { type: "object", properties: { treeId: { type: "string", description: "ID of the tree to analyze", }, }, required: ["treeId"], },
- src/index.ts:603-613 (registration)Registration and dispatch handler in the MCP server switch statement that calls the ResearchTreeManager.getCoverageAnalysis method and formats the response.case "get_coverage_analysis": { const result = treeManager.getCoverageAnalysis(args.treeId as string); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:322-334 (registration)Tool definition in the TOOLS array, including name, description, and schema, registered to the MCP server.name: "get_coverage_analysis", description: "Analyze the completeness of solution space exploration for a tree. Shows unexplored branches, unvalidated splits, and suggestions for next steps.", inputSchema: { type: "object", properties: { treeId: { type: "string", description: "ID of the tree to analyze", }, }, required: ["treeId"], }, },