Skip to main content
Glama

Search Files

search_files
Read-only

Recursively find files and directories by glob pattern, returning full paths for matches within allowed directories. Use it to locate items when the exact path is unknown.

Instructions

Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '.ext' to match files in current directory, and '**/.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patternYes
excludePatternsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds a meaningful constraint beyond them: 'Only searches within allowed directories,' which signals sandboxing behavior. It also states the return shape ('full paths to all matching items'), though an output schema already exists, so this adds modest value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose and pattern syntax efficiently, but 'Great for finding files when you don't know their exact location' is filler that repeats the implied value. Still generally tight and well ordered.

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?

Return values are covered by the output schema and safety by annotations, so the description only needs to cover search semantics and scope, which it does well. The gap is the undocumented path and excludePatterns 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 0%, but the description does clarify the most important parameter, pattern, with glob semantics ('*.ext' vs '**/*.ext') and the relative-to-working-directory rule. It says nothing about path or excludePatterns, so it only partially compensates for the coverage gap.

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?

States a specific verb and resource ('Recursively search for files and directories matching a pattern') and the recursion scope clearly distinguishes it from the flat listing siblings like list_directory and directory_tree. It does not name those siblings explicitly, so it falls short of a 5.

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?

'Great for finding files when you don't know their exact location' gives implied usage context, but there is no when-not guidance and no routing to alternatives such as list_directory or directory_tree. Usage is inferable rather than explicit.

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