get_leaf_tiles
Extract concrete ideas and projects from hierarchical research trees to identify actionable items and organize research workflows.
Instructions
Get all leaf tiles (concrete ideas/projects) from a tree
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| treeId | No | Optional tree ID to filter by |
Implementation Reference
- src/index.ts:546-556 (handler)MCP tool handler for 'get_leaf_tiles' that delegates to treeManager.getLeafTiles and returns JSON stringified result.case "get_leaf_tiles": { const result = treeManager.getLeafTiles(args.treeId as string | undefined); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:254-266 (registration)Registration of the 'get_leaf_tiles' tool in the TOOLS array, including name, description, and input schema.{ 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", }, }, }, },
- src/research-tree.ts:348-361 (helper)Core logic implementation of getLeafTiles in ResearchTreeManager class. Filters and returns all leaf tiles (isLeaf=true), optionally limited to a specific tree.getLeafTiles(treeId?: string): Tile[] { let tilesToSearch = Array.from(this.tiles.values()); // Filter by tree if specified if (treeId) { const tree = this.trees.get(treeId); if (!tree) { throw new Error(`Tree ${treeId} not found`); } tilesToSearch = this.getTilesInTree(tree.rootTileId); } return tilesToSearch.filter((tile) => tile.isLeaf); }