Skip to main content
Glama

search_code

Find code and text within a repository by searching file contents. Filter results by path, branch, file extension, or project.

Instructions

Search for code/text content in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoMax results to return
pathNoFolder path to search in (e.g., "/src")
branchNoBranch to search (default: default branch)
projectNoProject name
repositoryYesRepository name or ID
searchTextYesText to search for in file contents
fileExtensionNoFilter by file extension (e.g., ".cs", ".ts")
Behavior2/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 only states the basic purpose and does not mention any behavioral traits such as result format, pagination, rate limits, or whether it searches file contents versus metadata. This is a minimal description with no extra detail.

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 a single, front-loaded sentence with no wasted words. It clearly states the action and target. However, it is somewhat minimal and doesn't include any additional structure like usage hints, but for conciseness it is effective.

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?

Given the tool's complexity (7 parameters) and the absence of an output schema or annotations, the description is incomplete. It doesn't explain what the search returns (e.g., a list of matching files with snippets or just paths), nor does it cover pagination or result limits. The parameter schema covers inputs well, but the output behavior is entirely unexplained.

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 all 7 parameters, so the baseline is 3. The description adds no additional meaning to the parameters; it only repeats the general search function. It doesn't elaborate on how 'searchText' relates to 'path' or 'fileExtension', but the schema already provides adequate per-parameter descriptions.

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 'Search for code/text content in a repository' clearly states the specific verb (search), resource (code/text content), and scope (repository). It distinguishes the tool from siblings like 'get_file_content' (which retrieves a single file) and the various 'list_*' tools, as 'search' is a unique operation among the siblings.

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 offers no guidance on when to use this tool versus alternatives. It doesn't state conditions like 'when you need to find a string in code' or mention that for retrieving a known file, 'get_file_content' should be used instead. There is no explicit or implied context for tool selection.

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/elad-nofy/azure-devops-mcp'

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