Skip to main content
Glama

search_content

Search for text or regex patterns inside files recursively, with optional file pattern filtering.

Instructions

Search for text content within files. Supports both plain text and regular expressions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesText or regex pattern to search. Examples: "TODO", "function\s+\w+", "console\.log" (escape special chars)
directoryYesDirectory to search in (absolute or relative path). Searches recursively through all subdirectories
filePatternNoGlob pattern for files to include. Examples: "*.js", "src/**/*.ts", "**/*.{js,ts}" (default: all files)**/*
Behavior2/5

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

With no annotations, the description carries full burden but only mentions support for text and regex. It fails to disclose behavioral traits such as output format (e.g., file paths, line numbers), potential limits, or side effects, leaving agents uninformed.

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 extremely concise: two short sentences that directly state the purpose and key features. No unnecessary words, and the main action is front-loaded.

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

Completeness2/5

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

Despite low complexity (3 params, no output schema), the description omits crucial context: what search results look like, potential error conditions, and comparative guidance. For a search operation, this is insufficient.

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?

Input schema provides full coverage of parameters with descriptions, meeting the baseline. The description adds no extra semantic value beyond what the schema already offers.

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 'Search for text content within files' using a specific verb and resource, and distinguishes from siblings like search_files (filename search) and semantic_search. It also specifies support for plain text and regex.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies when to use (text content search) but provides no explicit guidance on when not to use or how it compares to alternatives like fuzzy_search. It is adequate but lacks explicit exclusions.

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/proofmath-owner/ai-filesystem-mcp'

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