Skip to main content
Glama

get_last_output

Retrieve identifying details and view URL for the most recent ComfyUI prompt that produced an image output, skipping failed prompts. Use to recover output info after a lost prompt_id or timeout.

Instructions

Get info for the most recent prompt that has image output (skips failed prompts). Use when prompt_id was lost (e.g. execute_workflow_sync timed out). Returns prompt_id, filename, subfolder, view_url. Then use download_by_filename to save the file. Requires COMFYUI_HOST.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does reasonably well: it discloses the failed-prompt-skipping behavior, the returned fields (prompt_id, filename, subfolder, view_url), and the COMFYUI_HOST prerequisite. It doesn't say what happens when no image output exists at all (empty result vs. error), which is the main remaining behavioral gap.

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?

Four short sentences, front-loaded with purpose then usage then return shape then next step. No filler or restatement of the tool name.

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?

No output schema exists, and the description compensates by listing the returned fields, plus it covers the environment requirement and the follow-up tool. Missing only the empty-result/edge-case behavior, which matters for a recovery-oriented tool.

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?

Zero parameters, so there is no parameter semantics to convey; baseline 4 applies. The description does not waste space inventing parameters.

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 ('Get info for the most recent prompt that has image output') with a distinguishing qualifier ('skips failed prompts') that separates it from list_outputs and get_history. An agent can tell exactly what this returns without reading a schema.

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?

Gives a concrete triggering scenario ('Use when prompt_id was lost (e.g. execute_workflow_sync timed out)') and names the natural follow-up (download_by_filename). It doesn't explicitly name which sibling tool to prefer in other circumstances, but the recovery-workflow context is clear.

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