Skip to main content
Glama

download_by_filename

Download a ComfyUI output file by filename without needing a prompt_id, saving it locally or returning base64 data with optional image format conversion.

Instructions

Download an output file by filename (no prompt_id needed). Uses GET /view. Use when you have filename from get_history or get_last_output. If return_base64 is true, file is not written to disk; returns base64 data. When size > 800 KB, automatically converts to WebP to stay under 1MB base64 limits. Use output_format to convert to png, jpeg, or webp. Requires COMFYUI_HOST.

Input Schema

NameRequiredDescriptionDefault
typeNoView type (default "output")
filenameYesOutput filename (e.g. from get_last_output or get_history)
dest_pathYesLocal path to save the file (ignored when return_base64 is true)
subfolderNoSubfolder (default empty)
output_formatNoConvert image to this format (png, jpeg, or webp) before saving or returning base64
return_base64NoIf true, return file as base64 (auto WebP when > 800 KB)
convert_qualityNoWebP/JPEG quality when converting (default 85)
max_base64_bytesNoWhen return_base64 and file size > this, convert to WebP (default 819200). Set 0 to disable.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that return_base64 skips disk writes, that files over 800 KB are auto-converted to WebP to fit base64 limits, and that COMFYUI_HOST is required. It stops short of stating overwrite behavior on dest_path or what happens on a missing filename.

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?

Front-loaded with purpose and the no-prompt_id qualifier, then behavior, then the environment prerequisite. Five sentences, nearly all substantive; 'Uses GET /view' is the only line that leans toward implementation trivia rather than agent-relevant guidance.

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 an 8-parameter tool with no annotations and no output schema, the description supplies the behavioral payload an agent needs: where the filename comes from, the base64-vs-disk branch, size-triggered conversion, and the host requirement. Only the return shape for the non-base64 (file-written) path is left implicit.

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 100%, so baseline is 3, but the description adds genuine meaning the schema does not: return_base64 suppresses disk writes entirely, and the 800 KB auto-WebP threshold explains the default for max_base64_bytes. These are interaction semantics rather than restated field labels.

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?

Specific verb+resource: 'Download an output file by filename' with the explicit disambiguator '(no prompt_id needed)' and the underlying endpoint. This cleanly separates it from download_output (prompt_id-based) and download_all_outputs in the sibling list.

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?

'Use when you have filename from get_history or get_last_output' gives a concrete triggering condition and names the upstream tools that produce the input. It does not state the inverse case (use download_output when you have a prompt_id), so the alternative is only implied.

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