Skip to main content
Glama

search_codebase

Search codebase files by query patterns to retrieve relevant matches with relevance scores. Supports filtering by project path, file scope, content inclusion, and tree-sitter analysis for precise code discovery.

Instructions

Atomic tool for searching codebase files based on query patterns. Returns raw file matches with relevance scores. Extracted from ResearchOrchestrator per ADR-018.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g., "Docker configuration", "authentication")
projectPathNoPath to project root.
scopeNoOptional file scope patterns (e.g., ["src/**", "config/**"])
includeContentNoInclude file content in results
maxFilesNoMaximum files to return
enableTreeSitterNoUse tree-sitter for enhanced analysis
relevanceThresholdNoMinimum relevance threshold (0-1)
Behavior2/5

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

No annotations provide safety or effect hints. The description lacks disclosure of behavioral traits such as read-only status, side effects, or permission requirements. The mention of 'atomic' is vague and not tied to behavioral guarantees.

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 two sentences with no redundancy. The first sentence clearly defines the action, and the second adds return details and context. Minor inefficiency: the extraction context may not aid tool selection.

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?

Despite high schema coverage, the description does not explain the return format, relevance scoring, or usage context (e.g., read-only). With no output schema, this leaves the agent underinformed about tool behavior.

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?

The input schema has 100% description coverage for its 7 parameters, so the baseline is 3. The description adds no additional meaning beyond 'searching based on query patterns', which is already in the 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 it searches codebase files based on query patterns and returns file matches with relevance scores. It distinguishes from sibling tools like 'read_file' and 'list_directory' by focusing on pattern-based search.

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

Usage Guidelines3/5

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

The description implies usage for searching codebase patterns but does not explicitly indicate when to use this tool versus alternatives like 'read_file' or 'analyze_environment'. No exclusions or contexts are mentioned.

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/tosin2013/mcp-adr-analysis-server'

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