Skip to main content
Glama

find_stray_pixels

Read-only

Detects disconnected non-transparent pixels in a sprite and lists lone pixels and small clusters by frame or layer to help clean up stray specks in pixel art.

Instructions

Find specks: non-transparent pixels cut off from the rest of the art.

Pixels touching on a side or a corner (8 neighbours) belong together. lone_pixels are groups of one pixel, small_clusters groups of two or three, each with its box and pixels. Both lists are in reading order and hold at most 50 entries; the counts give the totals. Without layer the visible composite is checked.

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": {
      "path": "<path>"
    },
    "name": "find_stray_pixels"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
frameNo1-based frame number
layerNoLayer name or 'group/child' path for that layer's own pixels; omit for the visible layers composited

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description goes well beyond that by defining connectivity (8 neighbours), how groups are classified (lone_pixels = one pixel, small_clusters = two or three), that each group carries a box and pixels, reading-order ordering, and a hard 50-entry cap with counts as totals. It does not say whether detection is limited by the frame/layer scope in any other way, but for a read-only query the behavioral picture is solid.

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?

Purpose is front-loaded in the first clause, then definitions follow in a logical order (connectivity, grouping, result shape, limits, default scope). The only wasted motion is the composite-default sentence, which duplicates the `layer` schema text.

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?

For a three-parameter read-only query with a full output schema, the description supplies the semantic glue the schema cannot: what counts as a stray pixel and how results are grouped and capped. Nothing essential to invoking it correctly is missing, though a hint about expected cost or typical output volume would round it out.

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 100%, so all three parameters are already documented, and the description's only parameter-related statement (composite when no layer is given) largely restates the schema's own wording for `layer`. With the schema doing the heavy lifting, the baseline 3 applies.

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?

"Find specks: non-transparent pixels cut off from the rest of the art" gives a concrete verb plus a precisely defined resource, including the criterion that makes a pixel 'stray'. It is unambiguous on its own, though it never contrasts itself with adjacent read/inspect tools such as read_pixels, so sibling differentiation is left to the name.

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?

Use is only implied: the tool detects stray pixels, presumably as a cleanup/diagnostic step before fixing them, but the description never states when to reach for it or when another inspection tool is preferable. The one conditional it does give ("Without layer the visible composite is checked") is scoping behavior rather than usage guidance.

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