Skip to main content
Glama

Retrieve a saved image

relay_image
Read-onlyIdempotent

Retrieve a previously saved image from a VM relay session by display phase, application file, or image reference. Use it to recover an image that failed to arrive, without recapturing or re-running.

Instructions

Retrieve one already-saved image; never a new capture, input or directory export, and it never acquires a VM. target selects a display phase (sessionId/executionId/phase: before/after), a declared application file (name, plus a relative path for a directory declaration), or an immutable reference (imageId). PNG, JPEG and WebP only; originals up to 64 MiB and 40,000,000 decoded pixels; the delivered preview is at most 2000x2000 px and 4 MiB of base64 (PNG originals are resampled in-process; JPEG/WebP pass through only within bounds). Each delivery has a 90-second deadline and up to three transfer attempts. A relay_run tool image is the application file name: "relay-run" at the path its result gives. If a run's inline image did not arrive, recover it here with the same imageId or display selector, never by repeating the input or capturing again, and stop after at most two such recovery calls if it still cannot be inspected. A closed enclosure returns stale-reference for a display or reference target; its delivered originals stay readable with host file tools. An attached image proves only that the block was included, not that anyone inspected or reviewed it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, but the description adds extensive behavioral context: it confirms the tool never acquires a VM, specifies format and size limits (PNG/JPEG/WebP, up to 64 MiB, 40M pixels, preview at most 2000x2000 px and 4 MiB base64), describes delivery behavior (90-second deadline, up to three attempts), and clarifies the meaning of 'attached image proves only inclusion, not inspection'. No contradictions with annotations.

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 dense but well-structured, with the core purpose front-loaded and technical details organized logically. While it is longer than typical tool descriptions, the complexity of the tool justifies the length. It could be slightly more concise by trimming redundant explanations, but every sentence carries value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (nested anyOf target variants, no output schema, no explicit parameter documentation), the description covers all necessary aspects: usage scenarios, constraints (size, format, deadlines), error handling (`stale-reference`), and recovery workflow. An agent would have sufficient information to call the tool correctly and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description compensates fully by explaining the semantics of the `target` parameter: it distinguishes the three source types (display, application, reference), defines the fields for each (e.g., `sessionId`/`executionId`/`phase` for display; `name` and `path` for application; `imageId` for reference), and clarifies the purpose of `relay-run`. This adds meaning far beyond the raw schema structure.

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 explicitly states 'Retrieve one already-saved image' and enumerates what it is not ('never a new capture, input or directory export, and it never acquires a VM'), clearly distinguishing it from siblings. The three target forms (display, application, reference) are defined with precise semantics, leaving no ambiguity about the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit when-to-use instructions, including recovery of relay_run images ('If a run's inline image did not arrive, recover it here...'), and when-not-to-use guidance ('never by repeating the input or capturing again'), with a stop condition ('stop after at most two such recovery calls'). It also mentions alternative tools for closed enclosures (host file tools). This is exemplary usage guidance.

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