2 tools. Generated from the live MCP tool schemas — do not edit by hand; run
npm run docs:gen.get_image
Fetch, browse and inspect ComfyUI images and registered assets. Driven by theaction parameter:
- action:“get” — Fetch a generated image from ComfyUI by FILENAME and return it as an inline image. Video/audio outputs (e.g. a VHS_VideoCombine .mp4) are saved to save_dir with their original extension instead of being rendered inline. Works with remote ComfyUI instances — does not require COMFYUI_PATH. Use get_history (action:“list”) first to obtain the filename.
- action:“view” — Fetch a registered asset’s bytes by ASSET ID and return them as an inline image so the agent can see the result. Use this after a render completes (asset_id is included in the completion notification) to inspect, critique, or compare generated images. Only supports image mime types (PNG/JPEG/WebP); audio/video assets must be saved to disk via action:“get”.
- action:“list_outputs” — List recently generated image AND video files from ComfyUI’s output/ directory, newest-first, with each file’s kind (‘image’ | ‘video’), subfolder, size, and modification time. Covers stills (.png/.jpg/.jpeg/.bmp) and video/animation outputs (.mp4/.webm/.mov/.mkv/.m4v/.avi/.gif/.webp). LOCAL ComfyUI (COMFYUI_PATH set): a RECURSIVE filesystem scan of output/ — includes subfolders like video/ that VHS/SaveVideo write to, and reports size + modification time. REMOTE ComfyUI: derives the list from /history over HTTP instead (size/modified are unavailable and omitted). It does NOT return the media bytes themselves — fetch those with action:“get”. USE THIS TO CONFIRM A VIDEO RENDER (e.g. VHS_VideoCombine / LTX / WAN output) when get_history (action:“list”) shows the prompt done but lists no output: VHS-style video nodes write the file but often do NOT register in ComfyUI’s /history, so the local filesystem scan is the reliable way to verify the .mp4 exists — then chain it with upload_image (action:“stage”). THAT GUARANTEE IS LOCAL-ONLY AND INVERTS ON A REMOTE TARGET: with no disk to scan, this falls back to the very /history that omits those videos, so a REMOTE listing can neither confirm nor deny a VHS video render, and absence from it is NOT evidence the file is missing. Check a specific filename with action:“get” or upload_image (action:“stage”) instead — both read /view, straight from the output directory. Every remote result says so in its own text. Read-only.
- action:“convert” — Re-encode a generated image to PNG, JPEG, or WebP and return it inline as an image content block. Source can be a registered asset_id or a path under the local ComfyUI output directory. Optionally writes the converted image back under the output directory and reports source/output size plus bytes saved.
- action:“analyze_color” — Measure the color of a rendered image (not by eye): returns black/white points, contrast (luma std), saturation, per-channel means + cast, and clipping — plus heuristic flags (washedOut, lowContrast, liftedBlacks, dimHighlights, lowSaturation, colorCast) and a one-line verdict. Source = asset_id, a ComfyUI output ref (filename/subfolder/type), or an image path. Pass reference_path to shot-match against a known-good frame (target−reference deltas). Set histogram:true to also get an overlaid R/G/B/luma histogram PNG. Use this to diagnose ‘washed out’ objectively and decide a color fix; for a video, extract a frame to PNG first.
- action:“list_assets” — List recently generated assets, newest-first. Each call first reconciles ComfyUI’s /history, so outputs are listed even when this session did not watch the render complete (e.g. queued via panel_run, by an earlier session, or before a server restart) — those are tagged source:‘history-reconcile’, versus source:‘watched’ for renders this server saw finish. Returns count + assets (asset_id, prompt_id, filename, url, source, created_at). The registry is ephemeral and clears on server restart; records expire after COMFYUI_ASSET_TTL_HOURS (default 24h), and only the most recent completed runs are reconciled — use get_history (action:“list”) / action:“get” by filename for anything older.
- action:“asset_metadata” — Get full provenance for a registered asset including the workflow snapshot that produced it. Use this to inspect the parameters that generated an image before calling generate_image (action:“regenerate”) with overrides.
Parameters
enum
required
Which image/asset operation to perform. “get” requires
filename; “view” and “asset_metadata” require asset_id; “convert” requires format plus exactly one of asset_id/path; action:“analyze_color” takes one source (asset_id, filename, or path); “list_outputs” and action:“list_assets” take no required parameters.
Options: action:"get", action:"view", action:"list_outputs", action:"convert", action:"analyze_color", action:"list_assets", action:"asset_metadata".string
Output image filename, e.g. PulID_Klein_00001_.png. REQUIRED for action:“get”. OPTIONAL for action:“analyze_color”, where it is one of the three ways to name a source (pair it with subfolder/type).
string
Asset id returned by action:“list_assets” or job completion. REQUIRED for actions “view” and “asset_metadata”. OPTIONAL for “convert” (provide exactly one of asset_id or path) and action:“analyze_color” (one of asset_id, filename, or path).
enum
ComfyUI directory the file lives in: output (default), input, or temp. Used by action:“get” and by action:“analyze_color” when the source is a
filename.
Options: output, input, temp.string
Subfolder within the directory, if any (default empty). Used by action:“get” and by action:“analyze_color” when the source is a
filename.string
action:“get” — absolute local directory to save the file in. Defaults to a ‘comfyui-images’ folder inside the platform temp directory (os.tmpdir()), which is created if missing. A RELATIVE value is resolved against this MCP process’s working directory, which is the client’s choice and may not be writable. On Windows a drive-less path like \out is resolved against this process’s CURRENT DRIVE, not a drive you chose. Prefer a fully-qualified path (C:… or \server\share); the returned ‘Saved to:’ line always names the resolved absolute path.
string
A source image path. action:“convert” — a path under COMFYUI_PATH/output (provide exactly one of asset_id or path). action:“analyze_color” — an absolute image path, or a path under the ComfyUI output dir (videos: extract a frame to PNG first).
integer
action:“list_outputs” — max media files to return, 1..100 (default 20). action:“list_assets” — max records to return (default: all, no upper bound).
string
action:“list_outputs” — filter by filename pattern (case-insensitive substring match).
enum
Two unrelated meanings, one per action — the enum is the union of both and each action accepts only its own half. action:“list_outputs” — RESPONSE SHAPE: “markdown” (default, human/agent-readable) or “json” ({images:[{filename,subfolder,kind,size,modified}]} — for app clients building pick grids). action:“convert” — REQUIRED target encoded image format: “png”, “jpeg” or “webp”.
Options:
markdown, json, png, jpeg, webp.integer
action:“convert” — encoder quality, 1-100. Applies where supported by the selected format.
boolean
action:“convert” — JPEG only: write a progressive JPEG.
boolean
action:“convert” — WebP only: write lossless WebP.
integer
action:“convert” — WebP only: encoder effort, 0-6.
string
action:“convert” — optional output path under COMFYUI_PATH/output where the converted image should be written.
string
action:“analyze_color” — optional reference image to shot-match against; returns target−reference deltas for contrast, black/white points, saturation, and per-channel means.
boolean
action:“analyze_color” — also return an overlaid R/G/B/luma histogram PNG for visual confirmation (default false).
string
action:“list_assets” — ISO timestamp; only return assets created at or after this time.
Examples
You say: Show me the last few things I generated.action: "get", which saves to disk.
You say: Save that render onto my desktop.
action: "view" for video and audio, which cannot be shown inline.
You say: Why does this render look so washed out?
action: "view" to actually see one.
You say: What settings produced that image?
upload_image
Put a file where ComfyUI (or cloud storage) can read it. Driven by theaction parameter:
- action:“image” — Upload a local image file to the connected ComfyUI’s input/ directory via the HTTP /upload/image endpoint so it can be referenced in LoadImage nodes. Works for both local and remote ComfyUI. Returns the stored filename.
- action:“video” — Upload a local video file (.mp4, .mov, .webm, .avi, .mkv, .m4v) to the connected ComfyUI’s input/ directory via the HTTP /upload/image endpoint for use in video-loading nodes such as VHS_LoadVideo (ComfyUI-VideoHelperSuite). Works for both local and remote ComfyUI. Returns the stored filename.
- action:“audio” — Upload a local audio file (.wav, .mp3, .flac, .ogg, .m4a, .aac) to the connected ComfyUI’s input/ directory via the HTTP /upload/image endpoint for use in audio-conditioned workflows (e.g. LoadAudio). Works for both local and remote ComfyUI. Returns the stored filename.
- action:“stage” — Stage an EXISTING ComfyUI output (or temp/preview) as an INPUT so the next stage’s loader (LoadImage / VHS_LoadVideo / LoadAudio) can read it. This is the CORRECT way to chain a multi-stage pipeline (e.g. Krea2 image → LTX video → WAN extend): it fetches the output’s bytes from the server via /view and re-registers them as an input via /upload/image — the same endpoints get_image and the uploads above use. Because it goes entirely through the server API, it works even when ComfyUI was launched with a CUSTOM input/output directory. Do NOT instead copy the output file or guess a filesystem
input/path — the server’s input dir may be custom and it will reject the file (“Invalid image file”), wasting the render. Pass an existing output reference ({ filename, subfolder?, type? }); the media kind (image/video/audio) is inferred from the extension unless you setkind. Returns the registered input { filename, subfolder, type: “input”, kind } — drop the returnedfilenamestraight into the loader’s image/video/audio widget. - action:“output” — Upload a generated ComfyUI output to CLOUD storage (this is the only action that sends bytes off the machine). Source can be asset_id or a local path under COMFYUI_PATH/output. Destination can be S3, Azure Blob, HTTP PUT, or HuggingFace via the hf CLI.
Parameters
enum
required
What to upload and where. “image”/“video”/“audio” send a LOCAL file (
source_path) to ComfyUI’s input/ directory; “stage” re-registers an EXISTING server-side output (filename) as an input; “output” ships a generated output to cloud storage (destination).
Options: action:"image", action:"video", action:"audio", action:"output", action:"stage".string
Absolute path to the local file to upload. REQUIRED for actions “image”, “video” and “audio”.
string
Two meanings, one per action. actions “image”/“video”/“audio” — OPTIONAL override for the filename in ComfyUI’s input/ directory (auto-detected from source_path if omitted). action:“stage” — REQUIRED filename of the EXISTING output/temp asset to re-register (from get_history or get_image action:“list_outputs”), e.g. LTX_video_00001.mp4; its destination name override is
as_filename, not this field.string
action:“stage” — subfolder the source asset currently lives in, if any.
enum
action:“stage” — source directory the asset lives in: output (default) or temp (previews).
Options:
output, temp.enum
action:“stage” — force the media kind instead of inferring it from the file extension.
Options:
image, video, audio.string
action:“stage” — override the filename it is registered under in the input/ directory (defaults to the source filename).
string
action:“output” — registered asset id from a completed job. Provide exactly one of asset_id or path.
string
action:“output” — path to a generated output under COMFYUI_PATH/output. Provide exactly one of asset_id or path.
object
action:“output” — REQUIRED. Exactly one upload destination.
Examples
You say: Use this photo as the starting image.image widget.
You say: Now feed that render into the video stage.
input/ path.