Skip to main content
Glama

get_image

Read-onlyIdempotent

Fetch a generated image as base64 from ComfyUI's output directory by filename, with optional subfolder, format, and quality settings.

Instructions

Retrieve a generated image as base64. Use this to fetch images from ComfyUI's output directory.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filename": "<filename>"
    },
    "name": "get_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoType of image locationoutput
filenameYesThe filename of the image to retrieve (e.g., 'ComfyUI_00001_.png')
subfolderNoSubfolder within the output directory
imageFormatNoOutput image format (jpeg is smallest, png is lossless, webp is modern)jpeg
imageQualityNoImage quality for JPEG/WebP (1-100, higher = better quality but larger)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered. The description usefully discloses the return encoding (base64) but says nothing about behavior when the file is missing, whether the image is re-encoded per imageFormat, or response size implications.

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?

Two short sentences with the return format front-loaded and no filler. The second sentence partly restates the first ('generated image' / 'fetch images'), keeping it from a perfect score.

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 five-parameter read tool with no output schema, the description covers the essential point an agent needs — that the result is base64 rather than a URL or binary handle. Error behavior and file-resolution details are absent but are secondary concerns.

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 all five parameters, enums, and defaults are already documented in the schema. The description adds only the base64 framing and no detail on how filename/subfolder/format interact, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (retrieve) and resource (a generated image returned as base64), plus the storage location (ComfyUI's output directory). It does not distinguish itself from retrieval-adjacent siblings such as get_download_url or get_generation_by_name, so it stops short of a 5.

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 phrase 'Use this to fetch images from ComfyUI's output directory' implies the usage context but gives no explicit when-not conditions and never names an alternative retrieval tool. An agent must infer when base64 retrieval is preferable to a download URL.

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