get_statistics
Retrieve comprehensive statistics about all tiling trees to analyze research organization and identify patterns in hierarchical knowledge structures.
Instructions
Get overall statistics about all tiling trees
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:615-625 (handler)MCP tool handler for 'get_statistics': calls treeManager.getStatistics() and returns the result as JSON text content.case "get_statistics": { const result = treeManager.getStatistics(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:336-342 (registration)Registration of 'get_statistics' tool in the TOOLS array, including name, description, and empty input schema.name: "get_statistics", description: "Get overall statistics about all tiling trees", inputSchema: { type: "object", properties: {}, }, },
- src/research-tree.ts:578-593 (handler)Core implementation of getStatistics() method in ResearchTreeManager class that computes and returns statistics on trees and tiles.getStatistics(): any { const allTiles = Array.from(this.tiles.values()); const allTrees = Array.from(this.trees.values()); const leaves = allTiles.filter((t) => t.isLeaf); const splits = allTiles.filter((t) => t.childrenIds.length > 0); return { totalTrees: allTrees.length, totalTiles: allTiles.length, leafTiles: leaves.length, splits: splits.length, validatedSplits: splits.filter((t) => t.isMECE === true).length, evaluatedLeaves: leaves.filter((t) => t.evaluation).length, commonSplitAttributes: this.getCommonSplitAttributes(), }; }
- src/research-tree.ts:595-611 (helper)Helper method called by getStatistics() to compute the most common split attributes used across all tiles.private getCommonSplitAttributes(): Array<{ attribute: string; count: number }> { const attributeCounts = new Map<string, number>(); for (const tile of this.tiles.values()) { if (tile.splitAttribute) { attributeCounts.set( tile.splitAttribute, (attributeCounts.get(tile.splitAttribute) || 0) + 1 ); } } return Array.from(attributeCounts.entries()) .map(([attribute, count]) => ({ attribute, count })) .sort((a, b) => b.count - a.count) .slice(0, 10); }