Skip to main content
Glama

read_image

Destructive

Reads palette-index pixels from a Pyxel image-bank region and optionally renders them to PNG or returns inline image content for visual verification.

Instructions

Read palette-index pixels from a Pyxel image-bank region and optionally render it to PNG; inline=true returns the render as image content and makes render_path optional.

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": {
      "script": "<script>",
      "image": "<image>"
    },
    "name": "read_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
hNo
wNo
xNo
yNo
imageYes
inlineNo
scriptYesLocal .pyxres file or trusted Pyxel script path.
render_pathNo

Output Schema

NameRequiredDescriptionDefault
okYes
errorsYes
pixelsNo
regionNo
renderedNo
bank_sizeNo
color_countNo
image_indexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.0
    • addedInput schema / properties / script / description
      Added value: +"Local .pyxres file or trusted Pyxel script path."
  2. Addedv1.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=true, and the description's mention of rendering to a PNG is consistent with a write path, so no contradiction arises. But the description never discloses that rendering writes a file to the local filesystem, whether an existing file at render_path is overwritten, or why the operation is flagged destructive — the key behavioral facts the agent needs.

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?

A single front-loaded sentence with no filler; the read action leads and the optional render follows. The trailing inline clause is slightly crammed but still parses as a distinct conditional.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the core read/render duality is covered. Still, for an 8-parameter tool with 13% schema coverage, the unaddressed region geometry and the filesystem-write behavior of render_path leave meaningful gaps.

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 only 13%, so the description must carry the load; it does add real meaning for inline and render_path and frames the tool around a 'region'. It does not explain x/y/w/h — the actual region bounds — nor what a null h or w means (full extent?), leaving four parameters semantically opaque.

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 ('Read palette-index pixels from a Pyxel image-bank region') plus an optional secondary effect ('render it to PNG'), which cleanly separates it from siblings like read_palette, read_tilemap, and read_audio.

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 description explains the inline=true conditional and that render_path becomes optional in that case, which is useful mode-switching guidance. However, it never says when to choose this tool over read_tilemap/read_palette, nor any when-not conditions or prerequisites for the 'script' argument.

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