Skip to main content
Glama

search_codebase

Find specific text or regex patterns in your codebase, returning matches with file paths and line numbers.

Instructions

Searches the codebase for text or regex patterns, returning matches with file paths and line numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesText or regex pattern to search for.
is_regexNoTreat query as a regular expression. Default: false.
file_patternNoGlob pattern to restrict search scope (e.g. "**/*.ts").
case_sensitiveNoCase-sensitive search. Default: false.
max_resultsNoMaximum number of results. Default: config value.
Behavior3/5

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

With no annotations provided, the description carries full burden but only states basic functionality (searching and returning matches). It does not disclose whether the tool is read-only, performance implications, or any side effects—though as a search tool, this may be less critical. It provides the core behavior but lacks depth.

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, well-structured sentence that front-loads the action and output. Every word is informative and there is no redundancy.

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

Completeness3/5

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

Given the absence of an output schema and the moderate complexity (5 parameters, no enums), the description is minimally adequate. It covers the main purpose but does not explain the structure of results or any advanced behavior like result ordering or error handling.

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 coverage is 100%, so baseline is 3. The description does not add any meaning beyond the schema; it summarizes the tool's purpose but does not elaborate on parameter semantics or usage nuances.

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 identifies the tool as searching the codebase for text or regex patterns, returning specific information (file paths and line numbers). It distinguishes itself from sibling tools like 'get_changed_files' and 'get_project_tree' which serve different purposes.

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 does not provide any guidance on when to use this tool versus alternatives, nor does it mention when not to use it. The agent receives no context about prioritization or exclusions.

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/Eltortilla1/synapse-code-mcp'

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