Skip to main content
Glama

Upload File

sdnext_upload

Upload base64-encoded files to the SD.Next server, storing them for later use in image generation and processing tasks.

Instructions

Upload a file to the SD.Next server (POST /sdapi/v1/upload, multipart form). Files land in the system temp dir (or relative to datadir when path is given). The server accepts "upload:" refs in image fields afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mimeNoapplication/octet-stream
pathNoTarget dir relative to SD.Next datadir (must exist); empty = system temp.
filenameYesClient file name.
overwriteNoOverwrite if the file already exists.
content_base64YesFile content as base64.
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the HTTP method and endpoint, the storage behavior (temp dir vs. datadir-relative), and the important server-side behavior of returning upload refs for later use. It omits auth/size limits/return format, but the disclosed details are meaningful and beyond schema.

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?

Three sentences with no fluff. The key action, endpoint, destination, and follow-up usage are packed efficiently, and the most important information is front-loaded.

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

Completeness4/5

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

For a moderately simple upload tool with no output schema, the description covers the endpoint, destination, and post-upload reference mechanism. It leaves out return value details and error cases, but given the schema and siblings, it provides sufficient context for an agent to invoke it correctly.

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

Parameters4/5

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

Schema coverage is 80%, so the baseline is 3. The description adds value by explaining that 'path' is a target directory relative to datadir and that uploaded files can be referenced later via 'upload:<id>', connecting filename/content_base64 to a real workflow. This goes beyond the schema's property descriptions.

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 ('Upload'), the target resource ('SD.Next server'), the exact endpoint and method ('POST /sdapi/v1/upload, multipart form'), and the post-upload use case. It clearly distinguishes this tool from siblings like sdnext_file or sdnext_delete_file.

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

Usage Guidelines4/5

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

The description conveys clear context: it explains where files land (system temp dir or datadir when a path is given) and how uploaded files are used ('upload:<id>' refs in image fields). It does not explicitly mention when not to use it or name alternatives, but the upload-specific purpose is unmistakable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Congenital/sdnext_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server