Skip to main content
Glama
Smart File Reader MCP Server

Smart File Reader MCP Server

search_files

Find files and folders matching a wildcard pattern inside a specified directory to locate relevant paths for reading or analysis.

Instructions

Search for files and folders matching a wildcard pattern (e.g. '.py', 'test_').

    Args:
        directory: Directory to search inside.
        pattern: Wildcard search pattern.
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "directory": "<directory>",
      "pattern": "<pattern>"
    },
    "name": "search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternYes
directoryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden, and it omits key behavioral facts: whether the search recurses into subdirectories, case sensitivity, hidden-file handling, and whether results are capped. It does add that both files and folders are returned, which is genuinely useful context, but that alone is thin for a search tool with zero annotation coverage.

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?

One front-loaded sentence states the operation and gives examples, followed by a compact Args block. The Args lines largely duplicate the schema titles, so they earn little, but nothing is bloated.

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?

An output schema exists, so return format need not be described, and the tool has only two required parameters. Still, the recursive-vs-flat search scope and pattern syntax are material questions an agent must answer before calling, and the description leaves both open.

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?

Schema description coverage is 0%, so both parameters carry only bare titles and the description must compensate. It restates them ("Directory to search inside", "Wildcard search pattern") and adds the wildcard concept plus an example, but never says whether directory is recursive, absolute, or relative, nor what wildcard syntax is supported.

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 gives a specific verb and resource ("Search for files and folders") plus concrete wildcard examples ('*.py', 'test_*'), so an agent can tell it matches on names. It does not distinguish itself from siblings such as search_file_content or list_files, leaving the name-matching vs. content-matching boundary implicit.

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?

Usage is only implied: the pattern examples indicate filename matching rather than content search, which weakly separates it from search_file_content. There is no explicit statement of when to prefer this tool over list_files or find_large_files, and no mention of when not to use it.

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