Skip to main content
Glama
rj9884
by rj9884

search_files

Locate specific text or regex matches across project files, returning file paths, line numbers, and matching lines. Filter by filename patterns and case sensitivity to pinpoint code quickly.

Instructions

Search for a text string or regex pattern across all files in the project. Returns matching file paths, line numbers, and the matching lines. Optionally filter by file name glob (e.g. '*.ts'). Skips node_modules, hidden directories, and binary files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe text or regular expression to search for
is_regexNoTreat query as a regular expression (default: false)
directoryNoSubdirectory to search in, relative to project root. Leave empty to search the whole project.
file_patternNoOptional filename filter, e.g. '*.ts' or '*.json'. Matches against the filename only, not the full path.
case_sensitiveNoWhether the search is case-sensitive (default: false)
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It transparently states that it skips node_modules, hidden directories, and binary files, and describes the return data. This exceeds basic expectations, though it could mention performance or edge cases.

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 two sentences, front-loaded with the primary action and return value, followed by filtering options and exclusions. Every sentence adds value, with no redundancy or unnecessary detail.

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

Completeness5/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 annotations, the description is remarkably complete. It conveys the tool's purpose, parameters (via examples), return format, and exclusion behavior, giving an agent everything needed to invoke it correctly.

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?

All 5 parameters are fully described in the schema (100% coverage), so the description adds only minimal value beyond the schema. It mentions a file glob example and regex/text search, but these are already covered by the schema definitions.

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 a search for text or regex across project files, with specific details about return values (file paths, line numbers, matching lines). This distinguishes it from sibling tools like list_files or read_file, 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly indicates this tool is for searching file contents across the entire project, with optional filters like file glob. It provides clear context but does not explicitly mention when not to use it or name alternative tools, so it stops short of a 5.

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/rj9884/universal-dev-mcp'

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