Skip to main content
Glama

search_files

Read-onlyIdempotent

Recursively search filenames and UTF-8 contents within an approved root using case-insensitive substring matching, returning relative paths and brief snippets.

Instructions

Recursively search filenames and UTF-8 contents inside an approved root with case-insensitive substring matching. Returns relative paths and brief snippets, bounded by max_results and a file scan limit; skips symlinks and build folders. Use read_file for complete text.

Input Schema

NameRequiredDescriptionDefault
pathNoRelative directory or subtree within the root; defaults to its top level..
rootYesName of a configured approved root returned by list_roots.
queryYesCase-insensitive filename or UTF-8 content substring to find.
max_resultsNoMaximum matching files, from 1 to 200; defaults to 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this as a safe, idempotent, non-destructive read, and the description adds useful behavior beyond them: results are bounded by max_results and a file scan limit, symlinks and build folders are skipped, and results are relative paths with brief snippets. It does not detail error behavior for missing roots or permission failures, but the operational profile is substantially enriched.

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?

Two tightly written sentences with no filler. The core search behavior and scope are front-loaded, and the alternative routing comes after the primary definition.

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?

No output schema exists, so the description appropriately explains the return shape: relative paths and brief snippets, bounded by limits. It also covers traversal exclusions. Minor gaps remain around failure modes, but for a read-only search tool with full schema coverage and complete annotations, it is adequately complete.

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 all four parameters are already documented, including query matching semantics and max_results bounds. The description reinforces that matching is case-insensitive and substring-based, but adds little beyond what the schema already provides.

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 gives a specific verb and resource ('Recursively search filenames and UTF-8 contents'), plus the matching model ('case-insensitive substring') and scope ('inside an approved root'). It also explicitly contrasts with read_file, so an agent can distinguish it from siblings without opening the schema.

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?

It clearly routes the agent to read_file for complete text rather than snippets, which is an explicit alternative. It does not state exclusions or when-not to use search, but the retrieval-use case is clear enough to support correct selection.

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

Deploy Server

Other Tools