Skip to main content
Glama

search_code

Search code in specified GitHub repositories by pattern and optional file extension to locate relevant files.

Instructions

Search code across specified repositories matching pattern and optional file extension filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reposYes
patternYes
file_extensionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It states the search action but does not disclose important behaviors such as whether the search is read-only, how pattern semantics behave (e.g., regex vs literal), what exactly is searched (file contents vs filenames), or any limitations.

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 one concise sentence, front-loads the primary action, and includes all three parameters at a high level. It has no filler or 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?

The tool is relatively simple (3 parameters, 2 required, no nested objects) and an output schema exists. Yet with no annotations and significant ambiguity in pattern semantics, a slightly richer description would make the tool safely and correctly invokable in more situations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 for the missing parameter details. It only restates the high-level purpose of repos, pattern, and file_extension without adding syntax, allowed values, or examples. It does not explain what a valid 'pattern' looks like or how file extensions are formatted.

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 states a specific verb ('Search'), a specific resource ('code across specified repositories'), and the matching conditions (pattern, optional file extension filter). It clearly distinguishes from sibling tools like search_local_files and search_repos by anchoring the search scope to user-selected repositories.

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 gives clear context: this tool searches code within given repositories, which implies when to use it over local-file or repository-metadata search. However, it does not explicitly mention alternatives or exclusions, so it falls short of the top 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/Dhananjayrbiraris/github-mcp'

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