Search files by name
nas_search_filesSearch the NAS index for files and folders by name, then narrow results by path, type, size, date, or tags to locate specific items.
Instructions
Search the NAS index for files and folders whose name contains the query (case-insensitive). It matches names, not file content. Give paths to limit the search to folders; subfolders are included unless recursive is false. The call waits for the search to finish and returns the first sorted page in data.results.ordered_items[], plus data.task_id. When data.next_offset is present there are more results: page through them with nas_search_results using the same sort_by and order. When data.task_removed is not true the search task is still stored on the NAS; release it with nas_search_results action "remove" when you are done. file_size and the time fields are strings. A search without paths or query can take minutes; narrow it first.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "nas_search_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Results per page (max 500). | |
| order | No | Sort direction. | |
| paths | No | Absolute NAS folders to search in. | |
| query | No | Part of the file or folder name. | |
| suffix | No | File extension without the dot, for example pdf. | |
| classes | No | Only these kinds of entries. | |
| sort_by | No | Sort key. Use the same sort_by and order on every page of one search. | name |
| tag_ids | No | Only files carrying these tag IDs. | |
| max_size | No | Largest file size. Bytes, or a number with K, M or G, for example 10K or 4M. | |
| min_size | No | Smallest file size. Bytes, or a number with K, M or G, for example 10K or 4M. | |
| recursive | No | Include subfolders of paths. | |
| max_results | No | Stop searching after this many matches. | |
| modified_to | No | Modified at or before this time. Unix time in seconds. | |
| modified_from | No | Modified at or after this time. Unix time in seconds. | |
| timeout_seconds | No | Time limit in seconds (default 120, max 1800). Raise it for large folders or files; a result cut off by the limit is incomplete. |