Skip to main content
Glama
yryuu
by yryuu

search_content

Search for text patterns across local files using regex, automatically skipping common directories like node_modules and .git for efficient results.

Instructions

Search for text pattern in files (grep-like functionality). Returns list of unique file paths containing the pattern. Recursively searches all subdirectories by default. Automatically skips node_modules, .git, dist, build directories and binary files for performance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path to search in. Use "." for root directory.
patternYesText pattern or regex to search for.
file_patternNoOptional: Regex pattern to filter files by name. IMPORTANT: Use regex syntax, not glob. Examples: ".*\.txt$" for .txt files, ".*\.xlsx?$" for Excel files, ".*\.(js|ts)$" for JS/TS files. To search ALL files, OMIT this parameter entirely (do not use "*" or ".*").
case_sensitiveNoWhether search should be case sensitive. Default: false.
max_resultsNoOptional: Maximum number of results to return. Default: 1000. Use lower values for faster searches in large codebases.
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it returns a list of unique file paths, recursively searches subdirectories by default, automatically skips certain directories and binary files for performance, and implies read-only operation. It lacks details on error handling or performance limits beyond the max_results parameter.

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 front-loaded with the core purpose in the first sentence, followed by essential behavioral details in concise sentences. Every sentence earns its place by adding value without redundancy, making it efficient and well-structured.

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 moderate complexity (5 parameters, no output schema, no annotations), the description is largely complete: it covers purpose, behavior, and key constraints. However, it lacks explicit information on output format details (e.g., structure of the returned list) and potential errors, which could be useful for an agent.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, such as mentioning 'grep-like functionality' which relates to the pattern parameter, but doesn't provide additional syntax or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

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 specific action ('Search for text pattern in files'), the resource ('files'), and distinguishes it from siblings by mentioning 'grep-like functionality' and returning 'unique file paths containing the pattern', which differentiates it from tools like find_files or list_directory that don't search content.

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 provides clear context for when to use this tool (searching text patterns recursively) and implicitly contrasts with siblings by specifying its unique functionality. However, it doesn't explicitly name alternatives or state when not to use it, such as for file metadata searches versus content searches.

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/yryuu/mcp-localfile-all-read'

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