Skip to main content
Glama

Retrieve a saved image

relay_image
Read-onlyIdempotent

Retrieve an already-saved image from a vm-relay guest by display phase, application file, or reference; use it to fetch pending after-snapshots or recover missing images without recapturing.

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 run's after-snapshot is pending in its result; retrieve it here with its imageId or display selector, which waits for its background download within the same deadline. If an image did not arrive, recover it here the same way, 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 guest 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.

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": {
      "guest": "<guest>",
      "target": "<target>"
    },
    "name": "relay_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
guestYesThe guest this call acts on: the name relay_acquire answered.
targetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.15.0
    • addedInput schema / properties / guest
      Added value: +{
      +  "description": "The guest this call acts on: the name relay_acquire answered.",
      +  "pattern": "^[a-z0-9][a-z0-9-]{0,47}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "target"
      -]New value: +[
      +  "guest",
      +  "target"
      +]
  2. Addedv0.5.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly/idempotent/non-destructive), and the description adds the traits that matter operationally: 90-second deadline, three transfer attempts, 64 MiB/40M-pixel originals vs. a 2000x2000/4 MiB delivered preview, in-process PNG resampling, and `stale-reference` behavior for a closed guest. This is far beyond what the annotations provide.

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?

Front-loaded with the purpose and exclusions, then limits, deadlines, and recovery rules — nearly every clause carries information. It is a dense single paragraph, though, and the closing caveat about attachment-vs-inspection is commentary rather than actionable guidance.

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?

With no output schema, the description still characterizes what comes back (preview dimensions/base64 budget, `pending` snapshots, `stale-reference`), and covers failure recovery and the closed-guest case. An agent has everything needed to call and interpret this correctly.

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?

Schema coverage is only 50% and the nested target variants carry no field descriptions, so the description does real work: it explains the three selector shapes (display phase via sessionId/executionId, declared application file by name plus relative path, immutable imageId reference). It does not add much about `guest` beyond the schema's own note, keeping it just short of 5.

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?

States a specific verb and resource ('Retrieve one already-saved image') and immediately bounds it: never a new capture, input or directory export, and never acquires a VM. This lets an agent separate it from relay_acquire/relay_extract without opening any schema.

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?

Explicit when-to-use (fetching an already-saved image, including a run's `pending` after-snapshot) and when-not (never repeat the input or capture again; recover here instead). It even gives a stop condition — at most two recovery calls — and names the failure mode that selects the recovery path.

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