Skip to main content
Glama

search_multiple

Search multiple codebases in parallel using natural language queries. Returns results grouped per codebase or fused into a single globally-ranked list.

Instructions

Search across multiple codebases concurrently.

Each codebase is indexed (incrementally, when needed) and searched in parallel, so overall latency is bounded by the slowest codebase rather than the sum of them all.

Args: query: Natural language description of what you're looking for paths: List of codebase paths to search (e.g., ["./repo1", "./repo2"]) mode: "file" for file-level, "chunk" for function/class level, "both" for combined limit: Max results per codebase (also the cap on fused results when global_ranking is True) language: Filter by language (python, typescript, etc.) output_format: Output format - "text", "json", or "markdown" global_ranking: When False (default), results are grouped under one "=== path ===" section per codebase. When True, results from every codebase are merged into a single list ranked across codebases with Reciprocal Rank Fusion and tagged by their source codebase — answering "across all my repos, where is the best match?". RRF fuses by rank position, so it is robust to the fact that raw similarity scores from different collections are not directly comparable.

Returns: Results grouped per codebase (default) or a single globally-ranked list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoboth
limitNo
pathsYes
queryYes
languageNo
output_formatNotext
global_rankingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: incremental indexing, parallel search, latency bounded by slowest codebase, and the effect of global_ranking with Reciprocal Rank Fusion. It also describes output grouping vs. global ranking.

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

Conciseness4/5

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

The description is well-structured with 'Args' and 'Returns' sections, front-loading the purpose. While it is thorough, it could be slightly more concise; for example, the explanation of RRF could be shortened. Nevertheless, every sentence adds value.

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

Completeness5/5

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

Given the tool's complexity (7 parameters, parallel search, two output modes), the description is complete. It covers indexing behavior, ranking fusion, output formats, and return grouping. The presence of an output schema is noted, but the description compensates effectively.

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

Parameters5/5

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

Despite 0% schema description coverage, the description explains every parameter: query, paths, mode (with enum options), limit, language, output_format, and global_ranking (with detailed explanation of its effect). This adds significant meaning beyond the bare schema.

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

Purpose5/5

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

The description clearly states the tool searches across multiple codebases concurrently with parallel execution. It uses specific verb and resource ('Search across multiple codebases') and distinguishes from siblings like 'code_search' (single codebase) and 'search_changed' (changed code).

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

Usage Guidelines4/5

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

The description explains when to use the tool (searching multiple codebases) and describes the behavior of parallel search and latency bound. It details options like 'mode' and 'global_ranking' with usage guidance. However, it does not explicitly mention when not to use the tool or list alternative sibling tools.

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/michaelkrauty/mcp-codesearch'

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