Skip to main content
Glama

search_codebase

Search your codebase using natural language queries to find code summaries with file locations. Filter results by framework, language, or architectural layer to locate relevant code components efficiently.

Instructions

Search the indexed codebase using natural language queries. Returns code summaries with file locations. Supports framework-specific queries and architectural layer filtering. Use the returned filePath with other tools to read complete file contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language search query
limitNoMaximum number of results to return (default: 5)
filtersNoOptional filters
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the search functionality, output format (code summaries with file locations), and integration with other tools. However, it doesn't mention performance characteristics, rate limits, authentication requirements, or error conditions. The description adds useful context but lacks comprehensive behavioral details for a tool with no annotation coverage.

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 perfectly concise with three sentences that each earn their place: first states the core functionality, second adds capabilities, third provides integration guidance. It's front-loaded with the main purpose and wastes no words.

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 (search with filtering), no annotations, and no output schema, the description does well by explaining the search approach, output format, and integration pattern. However, it could be more complete by mentioning what 'code summaries' contain or providing examples of effective queries. The absence of an output schema means the description should ideally explain return values more thoroughly.

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%, so the schema already documents all parameters thoroughly. The description mentions 'framework-specific queries and architectural layer filtering' which aligns with the filters.framework and filters.layer parameters, but doesn't add significant meaning beyond what's in the schema. The baseline of 3 is appropriate when the schema does the heavy lifting.

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: 'Search the indexed codebase using natural language queries. Returns code summaries with file locations.' It specifies the verb (search), resource (indexed codebase), and output (code summaries with file locations). It distinguishes from siblings by focusing on search functionality rather than metadata retrieval, dependency detection, or index management.

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 clear context for usage: 'Use the returned filePath with other tools to read complete file contents.' This indicates when to use this tool (for searching) versus alternatives (other tools for reading files). However, it doesn't explicitly state when NOT to use this tool or name specific alternative tools for different search needs, which prevents a perfect score.

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/PatrickSys/codebase-context'

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