Skip to main content
Glama

search_content

Find text patterns within files using plain text or regex, searching recursively through specified directories and file types.

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 provided, the description carries full burden for behavioral disclosure. It mentions the search supports 'plain text and regular expressions' but doesn't describe critical behaviors: whether it's read-only (likely, but not stated), performance characteristics (e.g., recursive search depth, timeouts), output format (matches, line numbers, context), or error handling. For a search tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 perfectly concise: two brief sentences that directly state the core functionality and key capability. Every word earns its place with zero redundancy or fluff. It's front-loaded with the primary purpose ('Search for text content within files') followed by an important detail ('Supports both plain text and regular expressions').

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?

Given no annotations and no output schema, the description is incomplete for a search tool. While the purpose is clear, it lacks information about what the tool returns (e.g., list of matches, file paths, line numbers), performance considerations, error conditions, or limitations. The agent cannot understand what to expect from invoking this tool beyond the basic input parameters.

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 fully documents all three parameters with clear descriptions and examples. The description adds no parameter-specific information beyond what's in the schema (it mentions 'text content' and 'regular expressions' but doesn't elaborate on parameter usage). This meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Search for text content within files' with specific capabilities for 'both plain text and regular expressions'. It distinguishes from sibling tools like 'search_files' (which likely searches for files rather than content) and 'fuzzy_search' (which implies approximate matching). However, it doesn't explicitly contrast with 'semantic_search' which might search by meaning rather than literal text.

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. It doesn't mention when to choose this over 'search_files', 'fuzzy_search', or 'semantic_search' from the sibling list, nor does it specify prerequisites or appropriate contexts beyond the basic functionality. The agent must infer usage from tool names alone.

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