search_tiles
Search for research content within hierarchical tile structures to find specific questions, hypotheses, methods, or results across interconnected nodes.
Instructions
Search for tiles by content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| treeId | No | Optional tree ID to filter by |
Implementation Reference
- src/research-tree.ts:471-489 (handler)Core implementation of the search_tiles tool logic: filters tiles matching the query in title, description, or splitAttribute, optionally within a specific tree.search(query: string, treeId?: string): Tile[] { let tilesToSearch = Array.from(this.tiles.values()); if (treeId) { const tree = this.trees.get(treeId); if (!tree) { throw new Error(`Tree ${treeId} not found`); } tilesToSearch = this.getTilesInTree(tree.rootTileId); } const lowerQuery = query.toLowerCase(); return tilesToSearch.filter( (tile) => tile.title.toLowerCase().includes(lowerQuery) || tile.description.toLowerCase().includes(lowerQuery) || tile.splitAttribute?.toLowerCase().includes(lowerQuery) ); }
- src/index.ts:588-601 (handler)MCP server handler for search_tiles tool: calls ResearchTreeManager.search and returns JSON result.case "search_tiles": { const result = treeManager.search( args.query as string, args.treeId as string | undefined ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:303-320 (schema)Input schema definition for search_tiles tool, registered in TOOLS array for ListTools requests.{ 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"], }, },
- src/index.ts:393-395 (registration)Registers all tools including search_tiles for listing via ListToolsRequestSchema.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));