get_top_leaves
Retrieve highest-rated research idea tiles by sorting criteria like impact or feasibility to identify promising directions for investigation.
Instructions
Get the highest-rated leaf tiles based on evaluation criteria
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| criteria | Yes | Criteria to sort by | |
| limit | No | Number of results to return (default: 10) | |
| treeId | No | Optional tree ID to filter by |
Implementation Reference
- src/research-tree.ts:427-466 (handler)Core handler function getTopLeaves in ResearchTreeManager class that filters evaluated leaf tiles, computes scores based on specified criteria (impact, feasibility, uniqueness, or combined average), sorts descending, and returns top N results.* Get top-rated leaf tiles based on evaluation criteria */ getTopLeaves( criteria: "impact" | "feasibility" | "uniqueness" | "combined", limit: number = 10, treeId?: string ): Tile[] { const leaves = this.getLeafTiles(treeId).filter((tile) => tile.evaluation); const scored = leaves.map((tile) => { let score = 0; const evaluation = tile.evaluation!; switch (criteria) { case "impact": score = evaluation.impact || 0; break; case "feasibility": score = evaluation.feasibility || 0; break; case "uniqueness": score = evaluation.uniqueness || 0; break; case "combined": score = ((evaluation.impact || 0) + (evaluation.feasibility || 0) + (evaluation.uniqueness || 0)) / 3; break; } return { tile, score }; }); return scored .sort((a, b) => b.score - a.score) .slice(0, limit) .map((item) => item.tile); }
- src/index.ts:280-302 (schema)Input schema definition for the get_top_leaves tool, specifying required 'criteria' parameter and optional 'limit' and 'treeId'.{ name: "get_top_leaves", description: "Get the highest-rated leaf tiles based on evaluation criteria", inputSchema: { type: "object", properties: { criteria: { type: "string", enum: ["impact", "feasibility", "uniqueness", "combined"], description: "Criteria to sort by", }, limit: { type: "number", description: "Number of results to return (default: 10)", }, treeId: { type: "string", description: "Optional tree ID to filter by", }, }, required: ["criteria"], }, },
- src/index.ts:572-586 (handler)Dispatch handler in the main CallToolRequestSchema switch statement that invokes treeManager.getTopLeaves with parsed arguments and formats the JSON response.case "get_top_leaves": { const result = treeManager.getTopLeaves( args.criteria as any, args.limit as number | undefined, args.treeId as string | undefined ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:27-390 (registration)The get_top_leaves tool is included in the TOOLS array registered with server.setRequestHandler(ListToolsRequestSchema) to advertise available tools.const TOOLS: Tool[] = [ { name: "create_tree", description: "Create a new tiling tree to explore a problem/challenge. The tree starts with a root tile representing the complete solution space, which you'll then split recursively using MECE (Mutually Exclusive, Collectively Exhaustive) principles.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name for this tiling tree", }, problemStatement: { type: "string", description: "The problem or challenge to explore (e.g., 'How can we reduce carbon emissions in transportation?')", }, }, required: ["name", "problemStatement"], }, }, { name: "split_tile", description: "Split a tile into MECE (Mutually Exclusive, Collectively Exhaustive) subsets using a specific attribute/dimension. This is the core operation of the tiling trees method - partitioning the solution space systematically. Use physics/math-oriented splits when possible.", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile to split", }, splitAttribute: { type: "string", description: "The attribute/dimension used to split (e.g., 'energy source', 'scale', 'physical mechanism', 'timeframe')", }, splitRationale: { type: "string", description: "Why this attribute was chosen for splitting", }, subsets: { type: "array", items: { type: "object", properties: { title: { type: "string" }, description: { type: "string", description: "Precise definition of this subset to ensure no overlap with siblings", }, isLeaf: { type: "boolean", description: "True if this is a concrete idea/project (leaf node)", }, }, required: ["title", "description"], }, description: "The mutually exclusive and collectively exhaustive subsets", }, }, required: ["tileId", "splitAttribute", "splitRationale", "subsets"], }, }, { name: "add_tiles_to_split", description: "Add additional tiles to an existing split (when you realize a category was missed). This invalidates the MECE validation and requires re-verification.", inputSchema: { type: "object", properties: { parentId: { type: "string", description: "ID of the parent tile", }, newTiles: { type: "array", items: { type: "object", properties: { title: { type: "string" }, description: { type: "string" }, isLeaf: { type: "boolean" }, }, required: ["title", "description"], }, description: "New tiles to add to the split", }, }, required: ["parentId", "newTiles"], }, }, { name: "mark_mece", description: "Mark a split as validated for MECE (Mutually Exclusive, Collectively Exhaustive) properties. Verify that the children completely cover the parent space with no overlaps.", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile whose split to validate", }, isMECE: { type: "boolean", description: "Whether the split is truly MECE", }, coverageNotes: { type: "string", description: "Notes on the completeness and exclusivity of the split", }, }, required: ["tileId", "isMECE"], }, }, { name: "evaluate_tile", description: "Evaluate a leaf tile (concrete idea/project) on impact, feasibility, and uniqueness. Include any calculations or pilot studies performed.", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile to evaluate", }, impact: { type: "number", description: "Impact rating (1-10 scale)", minimum: 1, maximum: 10, }, feasibility: { type: "number", description: "Feasibility rating (1-10 scale)", minimum: 1, maximum: 10, }, uniqueness: { type: "number", description: "Uniqueness rating (1-10 scale)", minimum: 1, maximum: 10, }, timeframe: { type: "string", description: "Expected timeframe (e.g., '1-2 years', '5-10 years')", }, notes: { type: "string", description: "Additional evaluation notes", }, calculationsOrPilots: { type: "string", description: "Calculations or pilot studies performed to evaluate this idea", }, }, required: ["tileId"], }, }, { name: "update_tile", description: "Update a tile's information (title, description, split attributes, etc.)", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile to update", }, title: { type: "string", description: "New title", }, description: { type: "string", description: "New description (precise definition)", }, splitAttribute: { type: "string", description: "Updated split attribute", }, splitRationale: { type: "string", description: "Updated split rationale", }, isLeaf: { type: "boolean", description: "Mark as leaf node", }, }, required: ["tileId"], }, }, { name: "get_trees", description: "Get all tiling trees", inputSchema: { type: "object", properties: {}, }, }, { name: "get_tile", description: "Get details of a specific tile", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile", }, }, required: ["tileId"], }, }, { name: "explore_path", description: "Explore the tree structure from a specific tile, showing the hierarchical breakdown", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile to explore from", }, depth: { type: "number", description: "How many levels deep to explore (default: 10)", }, }, required: ["tileId"], }, }, { name: "get_leaf_tiles", description: "Get all leaf tiles (concrete ideas/projects) from a tree", inputSchema: { type: "object", properties: { treeId: { type: "string", description: "Optional tree ID to filter by", }, }, }, }, { name: "get_unexplored_tiles", description: "Get tiles that haven't been split yet - these are gaps in your solution space exploration", inputSchema: { type: "object", properties: { treeId: { type: "string", description: "Optional tree ID to filter by", }, }, }, }, { name: "get_top_leaves", description: "Get the highest-rated leaf tiles based on evaluation criteria", inputSchema: { type: "object", properties: { criteria: { type: "string", enum: ["impact", "feasibility", "uniqueness", "combined"], description: "Criteria to sort by", }, limit: { type: "number", description: "Number of results to return (default: 10)", }, treeId: { type: "string", description: "Optional tree ID to filter by", }, }, required: ["criteria"], }, }, { name: "search_tiles", description: "Search for tiles by content", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query", }, treeId: { type: "string", description: "Optional tree ID to filter by", }, }, required: ["query"], }, }, { 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"], }, }, { name: "get_statistics", description: "Get overall statistics about all tiling trees", inputSchema: { type: "object", properties: {}, }, }, { name: "export_tree", description: "Export a tiling tree in various formats for visualization or documentation", inputSchema: { type: "object", properties: { treeId: { type: "string", description: "ID of the tree to export", }, format: { type: "string", enum: ["json", "markdown", "mermaid", "dot"], description: "Export format", }, }, required: ["treeId", "format"], }, }, { name: "validate_split_quality", description: "Validate split quality and detect common antipatterns (vague language, catch-all buckets, mixed dimensions, retroactive splitting, incomplete coverage). Returns a detailed quality report with issues and recommendations.", inputSchema: { type: "object", properties: { tileId: { type: "string", description: "ID of the tile whose split to validate", }, }, required: ["tileId"], }, }, { name: "get_tree_validation_report", description: "Get validation report for all splits in a tree. Identifies antipatterns and provides an overall quality score. Use this after building a tree to check for common failure modes.", inputSchema: { type: "object", properties: { treeId: { type: "string", description: "ID of the tree to validate", }, }, required: ["treeId"], }, }, ];