Skip to main content
Glama

upload_file_binary

Idempotent

Upload or overwrite binary files in Nextcloud, including images, PDFs, and archives. Provide base64-encoded content and destination path; creates file if missing.

Instructions

Upload or overwrite a binary file in Nextcloud.

Use this for images, PDFs, archives, or any non-text content. The content must be base64-encoded. For plain-text files, use upload_file instead.

Creates the file if it doesn't exist. Overwrites if it does.

Args: path: Destination path relative to user's root. Example: "Photos/photo.png" content_base64: File bytes encoded as a base64 string. May be empty to create an empty file. content_type: MIME type for the upload request (e.g. "image/png", "application/pdf"). If omitted, inferred from the path extension; falls back to "application/octet-stream". Note: Nextcloud re-derives the stored MIME type from the filename, so this mainly controls the HTTP upload header.

Returns: Confirmation message with the uploaded byte count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
content_typeNo
content_base64Yes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, it discloses that content must be base64-encoded, files are created or overwritten, content_type behavior and fallback logic, and that Nextcloud re-derives the stored MIME type from the filename. This adds substantial behavioral context without contradicting the annotations.

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

Conciseness5/5

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

The description is well-organized: purpose, usage guidance, parameter details, and return value. Each sentence adds value, and the key distinctions are front-loaded before the parameter details.

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

Completeness5/5

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

With three parameters fully explained, explicit MIME handling, overwrite semantics, and a return description, the tool is completely callable by an agent. The presence of an output schema means further return details are not required, and none are obviously missing.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates fully: path is defined as relative to user's root with an example, content_base64 is explained as base64-encoded bytes with empty allowed, and content_type is described with inference and fallback behavior. This is far more useful than the bare schema.

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?

The description states a specific verb and resource: 'Upload or overwrite a binary file in Nextcloud.' It clearly distinguishes this tool from upload_file by specifying it is for non-text content and directing plain-text use elsewhere.

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

Usage Guidelines5/5

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

It explicitly lists when to use this tool ('images, PDFs, archives, or any non-text content') and names the alternative for plain-text files ('For plain-text files, use upload_file instead'). The overwrite/create behavior also gives clear context for expected effects.

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