sync-files
Synchronize local folders with a NAS over SMB/CIFS in either direction, including bidirectional sync, file filtering, and custom path mapping.
Instructions
同步本地文件夹到NAS或从NAS同步到本地
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": {
"localPath": "<localPath>"
},
"name": "sync-files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| share | No | SMB共享名称(不传则使用默认配置) | |
| syncMode | No | 同步模式 | local-to-nas |
| localPath | Yes | 本地文件夹路径 | |
| fileFilter | No | 只同步指定文件名,如 ["demo.txt", "config.json"] | |
| remotePath | No | NAS上的远程路径 | / |
| customPattern | No | 自定义目录映射,如 "{1}/{3}" 表示保留第1、3层目录,文件名自动附加。支持 -1 表示父目录 | |
| deleteOrphaned | No | 是否删除目标端孤立文件 | |
| ignorePatterns | No | 忽略的文件模式 |