Skip to main content
Glama

Search Files

filesystem__search_files
Read-only

Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory.

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. Changed2 schema fields changedv0.4.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.4.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuine behavioral context beyond that: results are full paths to all matches, and the search is confined to allowed directories (with no traversal escape). It says nothing about result volume, ordering, or truncation on large trees, so a 3 is appropriate.

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?

Four sentences, front-loaded with the core action and then the pattern syntax, with no redundant restatement of the title. The pattern guidance at the top is the highest-value content and appears early. Slightly long, but each sentence contributes.

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 pattern semantics are covered thoroughly and an output schema exists so return values needn't be detailed, but with 0% schema coverage the description leaves 'path' and 'excludePatterns' entirely unexplained. An agent can call it, but must guess at the exclude list format and whether path is a base directory or a file.

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%, so the description must carry parameter meaning. It does this well for the trickiest parameter, explaining that patterns are glob-style, path-relative, with '*.ext' versus '**/*.ext' semantics. However, 'path' and 'excludePatterns' are never mentioned or explained, leaving two of three parameters undocumented.

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') plus the matching mechanism (glob patterns). The 'recursively' qualifier implicitly separates it from list_directory and directory_tree, though no sibling is named explicitly, which keeps it 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 Guidelines4/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 a clear positive use context, and 'Only searches within allowed directories' sets a boundary. No alternatives (e.g., list_directory for a single level, directory_tree for a full hierarchy) are named, so it stops short of explicit when-not guidance.

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