Skip to main content
Glama

repo.search

Search repository files using regex patterns and optional glob filters, with capped results for deterministic, bounded output.

Instructions

Search repo files using ripgrep with output caps and deterministic ordering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoFile glob filter (e.g. "*.ts")
patternYesSearch pattern (regex)
max_resultsNoMax results to return (default 50, cap 200)
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It meaningfully discloses behavioral traits beyond the schema: output caps and deterministic ordering, which inform the agent about result limits and stability. It does not detail return format or whether hidden/binary files are included, but for a read-only search tool this is solid.

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 core purpose ('Search repo files') and packs the most useful behavioral details—ripgrep, output caps, deterministic ordering—without any wasted words.

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

Completeness4/5

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

Given the tool's simplicity and full schema coverage, the description is nearly complete. It lacks an explicit statement of the return format (e.g., matching file paths and line content), but the mention of output caps and deterministic ordering partly compensates for the absence of an output schema.

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 already provides 100% coverage with clear descriptions for pattern, glob, and max_results. The description adds only general context about output caps and deterministic ordering, but does not explain parameter semantics beyond the schema, so the baseline of 3 is appropriate.

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 uses a specific verb ('Search') with a clear resource ('repo files') and distinguishes itself from sibling tools like repo.read_file and repo.run by indicating content search with ripgrep and deterministic output. It clearly conveys what the tool does and its key scoping traits.

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 implies when to use the tool—when you need to search repository file contents via regex and glob filtering—and the sibling tool list reinforces its distinct role. However, it does not explicitly state when not to use it or name alternatives, so it stops short of full usage guidance.

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/bgorzelic/ghostlink'

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