Skip to main content
Glama

comfyui_get_image

Read-onlyIdempotent

Download generated images from ComfyUI as base64 data or direct URL, with optional server-side thumbnails to reduce payload.

Instructions

Download a generated image from ComfyUI or return a direct view URL.

    Returns:
        Base64-encoded image data with content type prefix, or a direct image URL.
        When response_format='data_uri' and preview_format is set, ComfyUI re-encodes
        the image server-side as a smaller webp or jpeg thumbnail.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesName of the image file to retrieve
subfolderNoSubfolder within ComfyUI's output directory. Use the subfolder value from comfyui_list_outputs or generation results.
preview_formatNoIf set with response_format='data_uri', request a server-rendered thumbnail in this format instead of the original (smaller payload, lossy).
preview_qualityNoEncoder quality (1-100) for preview_format. Default: 90 when preview_format is set.
response_formatNo'data_uri' to inline the image, or 'url' to return a /view URLdata_uri
base_url_overrideNoOptional override for URL responses; falls back to configured base URL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description discloses useful behavioral details beyond annotations: it explains the return format (Base64 or URL) and the server-side re-encoding behavior when preview_format is used. Annotations already declare read-only/idempotent safety, so the additional context about response formats and thumbnail generation adds value.

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?

The description is concise with a clear opening sentence and a brief Returns section. It is front-loaded and each sentence contributes useful information, though the docstring-style 'Returns:' block is slightly formal but not wasteful.

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?

Given the rich schema annotations and output schema, the description covers the essential behavior (download vs URL, preview re-encoding). It is sufficient for an agent to understand the tool's capabilities, though it does not detail edge cases or error conditions, which are not critical here.

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 100%, so the schema already documents all parameters. The description adds a small amount of context about the behavior of response_format='data_uri' and preview_format re-encoding, but does not significantly enhance parameter understanding beyond what the schema provides.

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 clearly states the tool's function with a specific verb ('Download') and resource ('a generated image from ComfyUI'), and mentions the alternative of returning a direct view URL. This distinguishes it from sibling tools like comfyui_list_outputs (which lists images) and comfyui_upload_image (which uploads).

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?

The description implies usage for retrieving or downloading generated images, but does not explicitly state when to use this tool versus alternatives (e.g., comfyui_list_outputs for browsing, comfyui_get_workflow_from_image for extracting workflows). The context is clear but there are no explicit exclusions or alternative recommendations.

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/hybridindie/comfyui_mcp'

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