Skip to main content
Glama

Write file

nextcloud_write_file
Idempotent

Upload 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

NameRequiredDescriptionDefault
pathYes
contentYes
encodingNoutf-8
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.0.0
    • removedInput schema / properties / content / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "format": "binary",
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / content / type
      Added value: +"string"
    • addedInput schema / properties / encoding
      Added value: +{
      +  "default": "utf-8",
      +  "enum": [
      +    "utf-8",
      +    "base64"
      +  ],
      +  "type": "string"
      +}
  2. First observedv2.3.4

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=true and openWorldHint=true, so the safety profile is given. The description adds genuinely useful context beyond that: implicit parent-folder creation and version preservation on overwrite, both consistent with the non-destructive, idempotent hints. It does not cover failure modes (quota exceeded, path traversal/validation, permission errors), which matter for an open-world write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Short and front-loaded: the core action and parent-folder side effect come first, then the endpoint, then encoding guidance. The raw endpoint line is somewhat implementation detail, but it usefully conveys the path root; nothing else is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation with no output schema and only partial structured coverage, the description leaves meaningful gaps: the `overwrite=false` behavior and the path base directory. Return behavior is arguably excused by the absence of an output schema, but the parameter-level omissions keep this at minimum-viable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load. It does explain `encoding` well, mapping utf-8 to text and base64 to binary payloads. However, `overwrite` is never named or explained (what happens when set to false is left to inference), and `path` semantics (relative to the user's file root, as hinted only by the URL template) are not stated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Upload one file") plus an important side effect ("creating missing parent folders"), immediately distinguishing it from nextcloud_read_file, nextcloud_create_folder, and the item/version siblings. An agent can pick this over nextcloud_create_document without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the name and the encoding hint; there is no explicit when-to-use vs. alternatives guidance (e.g., create_document vs write_file for office files), no prerequisites such as authentication or write permission on the target folder, and no note on when overwrite=false is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools