Skip to main content
Glama

get_image_data

Read-onlyIdempotent

An asset's image as a data: URI to put straight into HTML ( or a CSS background), for sandboxes that cannot load images from another site, such as Claude's HTML artifacts. For an animation or rotation frame it returns ONE horizontal sprite strip (all frames side by side, each size×size) plus a CSS snippet that plays it. Shrunk to fit a reply (small sizes are fine for sprites; scale them up in CSS with image-rendering: pixelated). Free.

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": {
      "id": "<id>"
    },
    "name": "get_image_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAsset ID (from list_assets / get_asset or a previous result)
sizeNoPixels per image (square). Lowered automatically if the result would be too long
frameIdNoFrame id from get_asset (an animation, rotation set or edit). Omit for the base image
imageIndexNoOnly this image of the frame (e.g. one facing of a rotation set) instead of the strip

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare this safe, read-only and idempotent, so the bar is lower. The description still adds real behavior: output shrinks to fit a reply, size is lowered automatically, sprites are one horizontal strip with a CSS playback snippet, and the call is free. It does not quantify the shrink limits, but the schema's size bounds partially cover that.

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 core purpose, then progressively details the sprite variant and the size caveat. It is densely packed with parentheticals and pipes, which makes it slightly harder to scan, but no sentence is filler.

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?

There is no output schema, yet the description fully characterizes the return value – data URI string, or a sprite strip plus CSS snippet – and the shrink behavior. Combined with complete parameter documentation, an agent has everything needed to call it and consume the result 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 100%, so the baseline is 3. The description exceeds that by explaining what frameId produces (one strip plus CSS) and what imageIndex selects (a single facing instead of the strip), and by advising that small sprite sizes are fine because they can be scaled with image-rendering: pixelated.

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 names the exact resource and output form: an asset's image encoded as a data: URI ready for an <img src> or CSS background. It implicitly separates itself from metadata siblings like get_asset by promising actual pixel data, and the sprite-strip sentence pins down what comes back for animated or rotation frames.

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?

It gives a concrete condition for use – sandboxes that cannot load cross-site images, naming Claude's HTML artifacts – and states when the strip form applies (animation or rotation frames). It stops short of explicitly naming alternatives (get_asset, export_godot_spriteframes) or when not to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources