Skip to main content
Glama

Slice a PNG into parts for rigging

riv_slice_image

Cut character PNG into named polygon parts for cutout rigging. Outputs each part as PNG, a base image with parts erased, and bounding boxes for placement.

Instructions

Cut polygon regions out of a character PNG for parts-based rigging (cutout animation). Writes each part as .png plus base.png (source with parts erased) into outDir, and returns each part's bbox for placement. Use with riv_create: images per part + groups as pivots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outDirYesDirectory to write part PNGs into
pngPathYesSource PNG path
regionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.1
    • changedInput schema / properties / regions / items / properties / polygon / items / items
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]New value: +{
      +  "type": "number"
      +}
  2. First observedv0.5.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the outputs (part PNGs, base.png) and return value (bboxes), but does not disclose side effects like file system writes, overwriting behavior, or the meaning of 'base.png' (source with parts erased) in terms of destructive effects. It also doesn't mention potential errors or required permissions. More detail is needed for a tool that writes files.

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 sentences, each serving a purpose: what it does (first), what it outputs (second), and how to use it with siblings (third). Efficient and front-loaded with the core action.

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?

The tool is moderately complex (polygon cutting, file writes, bbox returns), but the description lacks critical behavioral details like whether it overwrites existing files, how it handles invalid polygons, and the coordinate system for the returned bboxes. However, the schema covers parameter structure, and the description mentions the return type. It's adequate but leaves gaps that could be filled.

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 coverage is 67%, meaning the 'keepInBase' parameter is not described in the schema, but the description mentions 'base.png (source with parts erased)' which hints at the erase behavior but doesn't explicitly mention the keepInBase option. The description adds some context for 'regions' (polygon coordinates in source image pixel coords) which is already in the schema. Over rating as it partially compensates for missing schema coverage.

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 states the tool's purpose with a specific verb ('Cut polygon regions out of a character PNG') and resource ('for parts-based rigging'). It distinguishes itself from the 'riv_create' tool by mentioning the workflow connection. It is distinct from siblings like 'riv_rig_character' which likely focuses on the overall rigging setup.

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 description explicitly mentions the typical use case ('for parts-based rigging (cutout animation)') and provides guidance on how it fits with the next step ('Use with riv_create: images per part + groups as pivots'). It does not explicitly state when not to use this tool versus alternatives, but the workflow hint is strong and clear enough for most agents.

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