Skip to main content
Glama

search_codebase

Find code by concept, symbol, or path using hybrid search that automatically routes queries to the appropriate method.

Instructions

Find code by concept, symbol, or path — hybrid codebase search.

mode="auto" (default) routes the query: identifier-shaped queries search
the indexed symbols (returns symbol_id/file/line bounds — pipe into
get_symbol), path-shaped queries resolve files (pipe into get_context),
and conceptual queries ("rate limiting", "where do we handle webhooks")
run wiki-semantic search. Mixed natural-language + identifier queries run
hybrid (symbol hits first, then concept pages). Concept results carry
search_method ("embedding" or "bm25" fallback: verify those); decision
records rank below file pages unless the query is why-shaped.

Args:
    query: identifier, path, or natural-language query.
    limit: max results (default 5).
    page_type: file_page | module_page | symbol_spotlight (concept only).
    kind: implementation | test | config | doc (concept/symbol modes).
    repo: alias, or "all" for workspace-wide.
    mode: auto | concept | symbol | path | hybrid.
    symbol_kind: filter symbol hits by kind (function|class|method|...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
modeNoauto
repoNo
limitNo
queryYes
page_typeNo
symbol_kindNo

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 carries the full burden and does an excellent job disclosing behavior: query routing logic, result types (symbol_id, file/line bounds), search method (embedding or bm25), and ranking (decision records below file pages). No contradictions.

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 a summary line followed by bullet points for modes and parameters. While comprehensive, it could be slightly more concise without losing clarity. Every sentence adds value.

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

Completeness4/5

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

Given the tool's complexity and the presence of an output schema, the description covers necessary behavioral aspects. It explains result types and query routing. Minor gaps: no mention of error cases or performance characteristics, but overall sufficient.

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?

Schema description coverage is 0%, so the description must compensate. It explains all 7 parameters in detail, including their effects and defaults (e.g., mode, repo, symbol_kind). 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's purpose: 'Find code by concept, symbol, or path — hybrid codebase search.' It specifies the resource (code) and the verb (find), and distinguishes from sibling tools by mentioning integration with get_symbol and get_context.

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 provides detailed guidance on when to use different modes (auto, concept, symbol, path, hybrid) and how results should be piped to other tools (e.g., 'pipe into get_symbol'). It gives examples of query types, though it lacks explicit 'when not to use' statements.

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/repowise-dev/repowise'

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