Skip to main content
Glama

search_code

Perform a fast git grep inside the repository, allowing regex matching by default or substring search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFull name of the repository (owner/name)
pathNoDirectory or file path to limit the search scope
queryYesSearch pattern or query to pass to git grep
ignoreCaseNoIgnore case distinctions in both the PATTERN and the input files (-i)
contextLinesNoPrint num lines of output context (-C)
fixedStringsNoUse fixed strings for patterns (don’t interpret pattern as a regex) (-F)
extendedRegexpNoUse extended regular expressions (-E)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedInput schema / properties / name / pattern
      Added value: +"^[a-zA-Z0-9_.-]+\\/[a-zA-Z0-9_.-]+$"
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that regex is the default matching mode and that substring search is possible, but does not mention other behavioral traits like read-only nature, authorization needs, rate limits, or result format.

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?

Single sentence with front-loaded purpose, no wasted words. Efficiently conveys core functionality.

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?

Description covers basic purpose but lacks details on output format, error conditions, or parameter usage nuances. With no output schema, completeness is moderate.

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

Parameters4/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 adds value by explaining default regex behavior (not in schema) and performance ('fast'), exceeding baseline.

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 performs a fast git grep inside the repository, specifying the verb (perform), resource (git grep inside repository), and capabilities (regex by default or substring). It is distinct from siblings like list_tree, read_code, search_repos, and view_repo, which focus on other operations.

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 provides no guidance on when to use this tool versus alternatives, such as search_repos (which might search repository names). It does not mention exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose: listing directory trees, reading source code, searching code, searching repositories, and viewing repository info. No overlaps.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (list_tree, read_code, search_code, search_repos, view_repo), making them predictable.

Tool Count5/5

With 5 tools, the server is appropriately scoped for code reading and searching tasks, neither too sparse nor overloaded.

Completeness4/5

Covers key read operations like directory listing, code retrieval, code search, repo search, and repo info. Minor gaps: no file metadata or commit history, but core functionality is solid.