Skip to main content
Glama

read_pixels

Read raw RGB layer pixels from an Aseprite document by region, returning RGBA rows or RLE runs without compositing transparency.

Instructions

读取普通 RGB 图层原始像素(不合成透明度)。region={x,y,width,height}; 按行优先返回 pixels=[[r,g,b,a],...] 或 encoding=rle 的 runs=[{count,rgba},...]。 空 Cel 返回透明像素,帧从1开始,必须匹配 expected_revision。

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": {
      "session_id": "<session_id>",
      "document_id": "<document_id>",
      "expected_revision": "<expected_revision>",
      "layer": "<layer>",
      "region": "<region>"
    },
    "name": "read_pixels"
  }
}

Input Schema

NameRequiredDescriptionDefault
frameNo
layerYes
regionYes
encodingNorgba
session_idYes
document_idYes
expected_revisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations present the description carries the full burden, and it delivers real behavior: it explains the two return encodings, that an empty Cel yields transparent pixels, that frames are 1-indexed, and that expected_revision must match. It stops short of saying what happens on a revision mismatch (error vs. retry) or whether the read is side-effect free.

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?

Terse, front-loaded, and organized by concern (scope, region format, return formats, edge cases). Line-broken technical fragments are appropriate here, though the return-format clause packs three ideas into one dense line.

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, so the description correctly spends its space describing return shapes (pixels=[[r,g,b,a],...] and runs=[{count,rgba},...]). For a 7-parameter, nested-object tool with zero schema descriptions this covers the critical gaps; only the revision-mismatch behavior is missing.

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 0%, so the description must compensate, and it does: it defines the region object shape as {x,y,width,height}, clarifies the frame indexing base, pins down encoding=rle, and flags expected_revision as a required concurrency guard. session_id and document_id remain unelaborated, though they are self-evident from siblings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (read raw pixels of a normal RGB layer) and adds the distinguishing qualifier that it does not composite transparency, which separates it from a rendered preview. It does not name get_preview explicitly, so the differentiation is implied rather than stated.

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?

Implies usage through the layer-type restriction ('normal RGB layer') and the note that regions are row-major, but never says when to reach for this over get_preview or get_document_info. No explicit when-not or alternative routing is given.

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