Skip to main content
Glama

search_files

Read-onlyIdempotent

Search files recursively under an allowed path using a regular expression pattern. Skips protected files and supports glob filtering and result limits for targeted matches.

Instructions

Search a regular expression in files under an allowed path (recursive, skips protected files).

Input Schema

NameRequiredDescriptionDefault
globNo*
pathYes
patternYes
max_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already establish that this is a safe, read-only, idempotent operation. The description adds useful behavior by stating it is recursive and skips protected files, but it does not explain result limiting or what happens when max_results is reached.

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 front-loaded sentence with no unnecessary wording. It efficiently conveys the core operation and two important scope constraints.

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

Completeness3/5

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

The annotations cover safety and an output schema exists, so return details are not needed in the description. However, for a four-parameter tool with no schema descriptions, the definition should explain glob and max_results more clearly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must carry parameter meaning. It clarifies that pattern is a regular expression and path is an allowed path, but leaves glob and max_results completely unexplained.

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 and resource: searching a regular expression in files. It also clarifies scope with 'recursive' and 'skips protected files,' making the operation distinct from siblings like list_dir and read_file.

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 explicit when-to-use guidance or alternatives. It mentions the path must be allowed, but that is a constraint rather than usage guidance for choosing this tool over run_command or read_file.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.