Skip to main content
Glama

search_files

Read-only

Find files and folders on macOS using Spotlight-style plain-word queries; filter by kind or folder and return paths, names, sizes, and modified dates.

Instructions

Search files and folders with Spotlight. The query is plain words, like in Spotlight. With 'kind', every word must be in the file name or at the start of a word in the content. Returns path, name, kind, size and modified date. Files that no longer exist are skipped.

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": {
      "query": "<query>"
    },
    "name": "search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoOnly this kind of item. 'document' means Word, Pages, OpenDocument and RTF files. 'text' means plain text, Markdown and code.
limitNoMost results to return. Default 25, maximum 200.
queryYesWords to look for.
folderNoSearch only inside this folder (an absolute path, or one that starts with ~).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses the matching semantics, the exact result fields (path, name, kind, size, modified date), and the quirk that stale files are silently skipped. Those are the details an agent needs to interpret results correctly, none of which the annotations carry.

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?

Four short sentences, front-loaded with the verb and resource, then matching rules, then return shape, then the stale-file caveat. Nothing is redundant or decorative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by enumerating the returned fields and the skip-stale behavior. Defaults and limits live in the schema, so nothing an agent needs to call this four-parameter tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description nonetheless adds meaning the schema does not, explaining that 'query' is plain words and that with a kind filter every word must appear in the name or at a word start in content. Folder path format and limit bounds are left to the schema, which documents them adequately.

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 files and folders') plus the underlying engine (Spotlight), so the agent knows exactly what domain is being queried. It never names a sibling, but the file/folder scope is distinct enough from the contact, event, mail and note search siblings.

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 tells the agent how to phrase the query ('plain words, like in Spotlight') and how matching behaves when a kind filter is applied, which is real invocation guidance rather than inference. It stops short of explicit when-not guidance or naming an alternative for cases Spotlight cannot cover.

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