Skip to main content
Glama

search_files

Read-only

Find files and folders by name: case-insensitive substring of the name, or a glob on the whole name when query has * or ? (e.g. *.js, report-??.pdf), searched under path (default the work session workspace, or ~ without a session). Returns a JSON array of full paths (maxResults, default 100). Stops after 8 seconds; on macOS a folder too large to scan in time is answered from the Spotlight index, elsewhere with the results found so far and scanComplete false, so give the most specific folder you can.

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
pathNo
queryYes
deviceIdNoComputer name or id
maxResultsNo
workSessionIdNoFrom create_work_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id; optional with one computer or a default"New value: +"Computer name or id"
    • removedInput schema / properties / query / minLength
      Removed value: -1
  2. Changed2 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id from list_devices. Optional with one computer online or a default set."New value: +"Computer name or id; optional with one computer or a default"
    • changedInput schema / properties / workSessionId / description
      Previous value: -"Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work."New value: +"From create_work_session"
  3. Changed2 schema fields changed
    • removedInput schema / properties / path / default
      Removed value: -"~"
    • addedInput schema / properties / workSessionId
      Added value: +{
      +  "description": "Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Well beyond the annotations, which already declare readOnlyHint=true and destructiveHint=false: the description discloses the return shape (JSON array of full paths), the maxResults default of 100, an 8-second time budget, and the macOS Spotlight fallback versus partial results with scanComplete false elsewhere. It leaves out whether deviceId points at remote machines, which matters for an openWorldHint=false tool.

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-loaded with the matching rules that an agent most needs, then defaults, then timeout behavior. Dense but essentially every clause carries operational information; the final advisory about choosing a specific folder is slightly buried at the end of a long sentence.

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?

For a five-parameter search tool with no output schema, the description covers return type, result volume, timeout, and degraded-result signaling, which is the practical surface an agent needs. The remaining gap is the device/work-session scoping parameters, which are never explained.

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?

With only 40% schema coverage, the description does real work: it explains glob versus substring matching for query, the default resolution for path, and restates the maxResults default and result cap. deviceId is left as unexplained as in the schema, so one of five parameters gains no meaning from either source.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Find files and folders by name') and immediately defines the matching semantics: case-insensitive substring, or a glob on the whole name when the query contains * or ?. The 'by name' qualifier implicitly separates it from search_content, which searches file contents rather than names.

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?

Gives actionable invocation guidance: default search root (work session workspace, or ~ without a session) and 'give the most specific folder you can' because of the 8-second cap. It does not explicitly name search_content as the alternative for content-based lookup, so routing between the two is left partly to inference.

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