Write file
nextcloud_write_fileUpload a single text or base64-encoded file to Nextcloud, creating missing parent folders and keeping prior versions on overwrite.
Instructions
Upload one file, creating missing parent folders.
PUT /remote.php/dav/files/{user}/{path}
Pass text with encoding="utf-8", or binary content (an image, a
video, an office document) base64-encoded with encoding="base64".
Uploading over an existing file keeps the old content as a version.
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": "nextcloud_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| encoding | No | utf-8 | |
| overwrite | No |