get_bounds
Measure the bounding box of non-transparent pixels per frame and across all frames in a sprite, using either the visible composite or a single layer's own pixels.
Instructions
The box around the non-transparent pixels of each frame, and around all of them.
Bounds are {x, y, w, h} in canvas coordinates, clipped to the canvas; null for an empty frame. Without layer the visible composite is measured, with layer that layer's own pixels.
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": "get_bounds"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| layer | No | Layer name or 'group/child' path for that layer's own pixels; omit for the visible layers composited | |
| frames | No | Frames: a number, "1-4", "1-4,7" or "all" (1-based) | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||