Skip to main content
Glama
mcp-synology

mcp-synology

search_files

Read-only

Search a folder and its subfolders for files or folders by name, extension, size, or modified date, returning matches up to a set limit.

Instructions

Search a folder and everything below it for files and folders by name, extension, size or modified date. For what's in one known folder, use list_files; for how much space a folder uses, use get_dir_size, not a search. With no filter, it returns everything under the folder, up to limit. A search that runs out of time returns what it found so far and says so.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMost results to return; the reply says when there are more.
patternNoName to look for: a bare word matches anywhere in the name (`Severance` finds `Severance.S02E10.mkv`); with `*` or `?` it's a wildcard pattern. `*.mkv` is treated as `extension="mkv"`.
size_toNoLargest size to match, in the same format as `size_from`.
filetypeNo`all` (default: files and folders), `file` or `dir`.all
mtime_toNoModified before this time (a file modified at exactly this time doesn't match), in the same formats as `mtime_from`.
extensionNoFile extension, without the dot (`mkv`).
recursiveNoSearch subfolders too (default true); `false` searches only `folder_path` itself.
size_fromNoSmallest size to match, in bytes or with a unit (`500MiB`, `2GiB`).
mtime_fromNoModified at or after this time: ISO 8601 (`2026-04-01T12:00:00+00:00`), a date (`2026-04-01`) or Unix epoch seconds; a time with no zone is UTC.
folder_pathYesThe folder to search (`/video`).
exclude_patternNoWildcard pattern for names to leave out (`*.torrent`), case-insensitive. Only `*` and `?` are wildcards: a bare word (`sample`) matches only that exact name, unlike `pattern`, and `[...]` and commas match themselves (`*.nfo,*.txt` is one pattern). Applied to the results DSM returns, so a reply can hold fewer than `limit`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.1
    • changedInput schema / properties / exclude_pattern / description
      Previous value: -"Wildcard pattern for names to leave out (`*.torrent`), case-insensitive. Applied to the results DSM returns, so a reply can hold fewer than `limit`."New value: +"Wildcard pattern for names to leave out (`*.torrent`), case-insensitive. Only `*` and `?` are wildcards: a bare word (`sample`) matches only that exact name, unlike `pattern`, and `[...]` and commas match themselves (`*.nfo,*.txt` is one pattern). Applied to the results DSM returns, so a reply can hold fewer than `limit`."
  2. Changed12 schema fields changedv0.9.1
    • addedInput schema / properties / exclude_pattern / description
      Added value: +"Wildcard pattern for names to leave out (`*.torrent`), case-insensitive. Applied to the results DSM returns, so a reply can hold fewer than `limit`."
    • addedInput schema / properties / extension / description
      Added value: +"File extension, without the dot (`mkv`)."
    • addedInput schema / properties / filetype / description
      Added value: +"`all` (default: files and folders), `file` or `dir`."
    • addedInput schema / properties / folder_path / description
      Added value: +"The folder to search (`/video`)."
    • addedInput schema / properties / limit / description
      Added value: +"Most results to return; the reply says when there are more."
    • addedInput schema / properties / mtime_from / description
      Added value: +"Modified at or after this time: ISO 8601 (`2026-04-01T12:00:00+00:00`), a date (`2026-04-01`) or Unix epoch seconds; a time with no zone is UTC."
    • addedInput schema / properties / mtime_to / description
      Added value: +"Modified before this time (a file modified at exactly this time doesn't match), in the same formats as `mtime_from`."
    • addedInput schema / properties / pattern / description
      Added value: +"Name to look for: a bare word matches anywhere in the name (`Severance` finds `Severance.S02E10.mkv`); with `*` or `?` it's a wildcard pattern. `*.mkv` is treated as `extension=\"mkv\"`."
    • addedInput schema / properties / recursive / description
      Added value: +"Search subfolders too (default true); `false` searches only `folder_path` itself."
    • addedInput schema / properties / size_from / description
      Added value: +"Smallest size to match, in bytes or with a unit (`500MiB`, `2GiB`)."
    • addedInput schema / properties / size_to / description
      Added value: +"Largest size to match, in the same format as `size_from`."
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "tool_search_filesOutput",
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changedv0.8.0
    • removedInput schema / properties / additional
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
  4. Changed28 schema fields changedv0.7.0
    • addedInput schema / properties / additional
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • removedInput schema / properties / exclude_pattern / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / exclude_pattern / default
      Removed value: -null
    • removedInput schema / properties / exclude_pattern / title
      Removed value: -"Exclude Pattern"
    • addedInput schema / properties / exclude_pattern / type
      Added value: +"string"
    • removedInput schema / properties / extension / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / extension / default
      Removed value: -null
    • removedInput schema / properties / extension / title
      Removed value: -"Extension"
    • addedInput schema / properties / extension / type
      Added value: +"string"
    • removedInput schema / properties / filetype / title
      Removed value: -"Filetype"
    • removedInput schema / properties / folder_path / title
      Removed value: -"Folder Path"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • addedInput schema / properties / mtime_from
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / mtime_to
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / pattern / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / pattern / default
      Removed value: -null
    • removedInput schema / properties / pattern / title
      Removed value: -"Pattern"
    • addedInput schema / properties / pattern / type
      Added value: +"string"
    • removedInput schema / properties / recursive / title
      Removed value: -"Recursive"
    • removedInput schema / properties / size_from / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / size_from / default
      Removed value: -null
    • removedInput schema / properties / size_from / title
      Removed value: -"Size From"
    • addedInput schema / properties / size_from / type
      Added value: +"string"
    • removedInput schema / properties / size_to / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / size_to / default
      Removed value: -null
    • removedInput schema / properties / size_to / title
      Removed value: -"Size To"
    • addedInput schema / properties / size_to / type
      Added value: +"string"
    • removedInput schema / title
      Removed value: -"tool_search_filesArguments"
  5. First observedv0.4.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description goes further and discloses two traits annotations cannot express: results are capped by limit with an indication when more exist, and a timed-out search returns partial results and says so. That partial-result disclosure is exactly the kind of non-obvious behavior an agent needs before relying on completeness.

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 sentences, each doing distinct work: purpose, sibling routing, no-filter default, timeout behavior. The core capability is front-loaded and nothing is repeated from the schema.

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?

For an 11-parameter read tool with full schema coverage plus annotations, this description supplies everything left unsaid: default filter behavior, limit semantics, and partial-result/timeout behavior. No output schema exists, but the description characterizes the reply well enough (count-limited, self-reporting when truncated) that the omission is not a problem.

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 already 100%, so the bar is baseline 3; the description earns above that by explaining the collective default of all filter parameters ('with no filter, it returns everything under the folder, up to limit'), which the per-parameter schema text does not state. It stops short of clarifying filter combination or precedence, which would be the only remaining gap.

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 with scope ('a folder and everything below it') and enumerates the filter dimensions (name, extension, size, modified date). It explicitly contrasts itself with list_files and get_dir_size in the same breath, so an agent can distinguish it from the closest siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing rules: use list_files when the target is one known folder, use get_dir_size for space accounting and 'not a search'. It also states the no-filter default ('returns everything under the folder, up to limit'), covering the case where an agent might otherwise hesitate about empty filters.

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