Skip to main content
Glama

get_layer_pixels

Read pixel data from a layer slot as RGBA coordinates for read-modify workflows. Sample a region or filter to opaque pixels only, capping response size, without modifying the layer.

Instructions

Sample a region of design/layers/.png for read-modify workflows.

Returns pixels as [{x,y,rgba:[r,g,b,a]}, ...]. Caps response size; use a smaller region or opaque_only=true. Does not modify the layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
nameYes
slotYes
widthNo
heightNo
plan_idNo
output_dirNo
opaque_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the return format, response size capping, the opaque_only escape hatch, and the fact that the tool is non-mutating. This is strong behavioral disclosure, though it does not explain the exact cap or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences. The purpose is front-loaded, followed by return format, size limits, and non-mutating behavior. Every sentence earns its place and there is no filler.

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?

For a read-only tool with an output schema, the description covers the essentials: what is read, what is returned, and that it is safe. However, with no annotations and 0% schema description coverage, it leaves several parameters unexplained, so an agent may not confidently know how to fill name, plan_id, or output_dir.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It explains that 'slot' appears in the file path and that 'opaque_only' reduces response size, but it leaves most of the 9 parameters undefined, including the required 'name' and the optional 'plan_id' and 'output_dir'. The description adds some meaning but does not adequately document the parameter set.

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 clearly specifies a verb ('sample'), a resource ('design/layers/<slot>.png'), and a region-based scope. It also signals that this is for reading pixels before modification, which distinguishes it from sibling mutation tools like set_pixels, paint_pixels, and flood_fill.

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?

The phrase 'for read-modify workflows' gives clear context for when this tool is appropriate, and 'Does not modify the layer' rules out destructive misunderstandings. It does not explicitly name alternative tools, but the context is sufficient for an agent to infer when to use it.

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