Skip to main content
Glama

upload_file

Upload local image files into ComfyUI's input directory to stage source images for img2img or inpaint workflows. Requires absolute paths; optionally overwrite existing files.

Instructions

Upload files from this machine into the target ComfyUI's input directory.

Wraps comfy upload <files...> --overwrite/--no-overwrite. Stages source images/masks a workflow references by filename — required for img2img/inpaint.

Args: overwrite: True replaces an existing file; False (default) keeps it and stores the upload under a deduplicated name.

Uploads to whichever ComfyUI this server targets (local, or a configured COMFYUI_URL/COMFYUI_HOST) — needs comfy-cli >= 1.14.0 for the remote case; older raises rather than silently staging files the remote can never find.

Gotchas:

  • Every path must exist on THIS filesystem and be ABSOLUTE — a relative path resolves against comfy-cli's workspace cwd, not the agent's.

  • A cancelled/timed-out call strands a partial batch; re-run to finish.

  • If attached in chat, MCP never receives the bytes — look for the absolute path some clients inject into context (e.g. Claude Code's [Image: source: <path>]) and pass that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden, and it delivers: it discloses overwrite/deduplication behavior, remote target resolution via COMFYUI_URL/COMFYUI_HOST, the comfy-cli >= 1.14.0 requirement, cancellation partial-batch behavior, and the chat-attachment limitation. This gives the agent a realistic model of side effects and failure modes.

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 dense but not bloated; the main purpose is front-loaded, followed by an Args section, remote-context note, and Gotchas. Every sentence contributes operational information an agent cannot infer from schema or annotations, so the length is justified.

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?

For a two-parameter upload tool with no annotations and no output schema, the description covers invocation requirements, environment targeting, version constraints, edge cases, and failure behavior. The only minor omission is a description of the return value, but that does not impede correct invocation, and the description is otherwise exceptionally complete.

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%, so the description must compensate. It does: 'paths' is explained by the absolute-path and filesystem-existence requirements, and 'overwrite' is explicitly described ('True replaces an existing file; False (default) keeps it and stores the upload under a deduplicated name'). Both parameters gain meaning beyond bare schema titles.

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 opening sentence states a specific verb and resource: 'Upload files from this machine into the target ComfyUI's ``input`` directory.' It also gives concrete purpose context ('Stages source images/masks a workflow references by filename — required for img2img/inpaint'), which clearly distinguishes it from sibling tools like download_model, generate_image, and run_workflow.

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 clearly explains when this tool is needed ('required for img2img/inpaint') and sets important conditions for use, such as 'Every path must exist on THIS filesystem and be ABSOLUTE.' It does not explicitly name alternative tools or exclusion cases, but the context is strong enough for an agent to decide when to invoke it.

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