search_files
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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Most results to return; the reply says when there are more. | |
| pattern | No | 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"`. | |
| size_to | No | Largest size to match, in the same format as `size_from`. | |
| filetype | No | `all` (default: files and folders), `file` or `dir`. | all |
| mtime_to | No | Modified before this time (a file modified at exactly this time doesn't match), in the same formats as `mtime_from`. | |
| extension | No | File extension, without the dot (`mkv`). | |
| recursive | No | Search subfolders too (default true); `false` searches only `folder_path` itself. | |
| size_from | No | Smallest size to match, in bytes or with a unit (`500MiB`, `2GiB`). | |
| mtime_from | No | 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. | |
| folder_path | Yes | The folder to search (`/video`). | |
| exclude_pattern | No | 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`. |