Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYesSearch query
treeIdNoOptional tree ID to filter by

Implementation Reference

  • 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)
      );
    }
  • 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),
          },
        ],
      };
    }
  • 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,
    }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('search') but doesn't describe what 'search' entails—e.g., whether it's fuzzy or exact matching, if it returns paginated results, what the output format is, or any rate limits. For a search tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—'Search for tiles by content' is front-loaded and directly conveys the core function. Every word earns its place, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search operation with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., search mechanics, result format), usage context, and output expectations. For a tool with 2 parameters and potential variability in results, this minimal description doesn't provide enough context for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('query' and 'treeId') documented in the schema. The description adds no additional meaning beyond the schema—it doesn't explain what constitutes 'content' for the query or how the treeId filter works. Baseline 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate with extra context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Search for tiles by content' clearly states the verb ('search') and resource ('tiles'), with the qualifier 'by content' indicating the search scope. It distinguishes this from siblings like 'get_tile' (fetch single tile) or 'get_leaf_tiles' (list leaf tiles without search), though it doesn't explicitly name alternatives. The purpose is specific but could be more differentiated from other retrieval tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing existing tiles), exclusions (e.g., not for filtering by other attributes), or compare to siblings like 'explore_path' or 'get_unexplored_tiles'. Usage is implied by the name but not explicitly stated, leaving gaps for an AI agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/k-chrispens/tiling-trees-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server