Upload file

Write a file to your Nextcloud at a path. It does not replace an existing file unless you say so.

MCP tool nextcloud_write → upload_file

write Confirm

Writes a file at the path you give. Text goes in as content; for a binary file such as a PDF, send base64 and set encoding. If a file already exists at that path, the call fails unless overwrite is true, because Nextcloud replaces the old file otherwise. Missing parent folders are created. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: upload_file
NameTypeDescription
path string required string Path inside your files, starting with a slash, e.g. '/Clients/Acme/proposal.pdf'.
content string required string File content, as text or base64.
encoding enum enum text or base64. Default: text.
overwrite boolean boolean Replace an existing file. Default: false.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "nextcloud_write",
    "arguments": {
      "operation": "upload_file",
      "arguments": {
        "path": "/Clients/Acme/proposal.pdf",
        "content": "content"
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "path": "/Clients/Acme/proposal-q4.pdf",
    "size": 421880,
    "status": "created",
    "file_id": 49027
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.