Skip to main content
Glama

File Search

file_search
Read-only

Searches for files and folders by name (case-insensitive, partial match) starting from a root directory. Defaults to the home directory. Returns matching items with path, type, and size, most recently modified first. Office lock files (~$name) are never returned, and nothing under ~/Library is unless root points inside it.

Input Schema

NameRequiredDescriptionDefault
rootNoRoot directory to search from. Defaults to home directory (~).
queryYesFilename pattern to search for (partial, case-insensitive)
file_typeNoFilter by extension, e.g. 'pdf', 'docx', 'xlsx'. Omit for all types.
max_resultsNoMaximum number of results to return. Default 50, max 200.

Output Schema

NameRequiredDescriptionDefault
noteNoWith partial: what to do next (a narrower root or query).
rootNo
countNo
queryNo
partialNoPresent and true when the search stopped at its limit before covering the whole folder: the results may be incomplete.
resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "With partial: what to do next (a narrower root or query).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / partial
      Added value: +{
      +  "description": "Present and true when the search stopped at its limit before covering the whole folder: the results may be incomplete.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / cloud_only
      Added value: +{
      +  "description": "Present and true when the file is only in iCloud/the cloud provider (not on disk): reading it needs force_download",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint=false, destructiveHint=false, so safety is covered. The description adds genuinely non-obvious behavior: the ~$ lock-file exclusion, the ~/Library exclusion unless root points inside it, and the most-recently-modified-first ordering. These are real behavioral facts not present in the structured fields.

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?

Three dense, front-loaded sentences with no filler; scope comes first, then defaults, then return shape and exclusions. Slightly overloaded by combining ordering and two exclusion rules into one sentence, but nothing is wasted.

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?

An output schema exists so return values needn't be spelled out, yet the description still summarizes path/type/size. Exclusions, defaults and ordering are covered; it stops short of noting whether results can be truncated at max_results or how deep recursion goes, which are the remaining gaps for a filesystem search.

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 coverage is 100% and the description's parameter facts (default home root, case-insensitive partial match) duplicate the schema's own root and query descriptions. Baseline 3 is appropriate; nothing meaningful is added about file_type or max_results semantics (e.g., truncation behavior).

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?

Specific verb+resource ('searches for files and folders by name') plus match semantics (case-insensitive, partial) and scope (root directory). It does not distinguish itself from the many sibling search tools (finder_search, file_list, gdrive_search_files, onedrive_search_files), so an agent cannot pick it over those from the description alone.

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 context is implied by 'starting from a root directory' and 'Defaults to the home directory', plus two negative rules (lock files, ~/Library). But there is no explicit guidance on when to choose this over finder_search or file_list, which is the main ambiguity for an agent with these siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources