ugreen_write_file
Write UTF-8 content to an existing NAS file using overwrite, append, or byte-offset patch modes. Use dry_run to preview important overwrites before committing.
Instructions
写入一个已存在的 NAS 文件,UTF-8 内容最多 256 KiB。write 覆盖原内容;append 追加;patch 按字节 offset 局部写入。仅 patch 接受 offset;新建文件使用 ugreen_create_file 或上传。先用 dry_run 核对重要覆盖。仅操作用户指定的对象;写操作失败后先查询当前状态,不自动重试。权限由绿联令牌与 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": {
"path": "<path>",
"content": "<content>"
},
"name": "ugreen_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | write | |
| path | Yes | ||
| offset | No | ||
| content | Yes | ||
| dry_run | No |