Skip to main content
Glama

resize_canvas

Destructive

Change a sprite's canvas size without scaling artwork, adding or trimming space around existing pixels; choose top-left or center anchor.

Instructions

Resize the canvas WITHOUT scaling the artwork (adds or trims space).

anchor controls where existing content sits in the new canvas:
"top_left" (default) or "center". The new canvas is subject to the same
dimension/area caps as `create_sprite`.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
anchorNoDefault: "top_left".top_left
heightYes
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.10.0
    • addedInput schema / properties / anchor / description
      Added value: +"Default: \"top_left\"."
    • removedInput schema / properties / anchor / title
      Removed value: -"Anchor"
    • removedInput schema / properties / filename / title
      Removed value: -"Filename"
    • removedInput schema / properties / height / title
      Removed value: -"Height"
    • removedInput schema / properties / width / title
      Removed value: -"Width"
    • removedInput schema / title
      Removed value: -"resize_canvasArguments"
  2. First observedv0.7.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description consistently adds real behavioral context: that space is added or trimmed, and that the new canvas is bound by the same dimension/area caps as create_sprite. It does not state effects on existing layers/cels or failure modes, keeping it from a 5.

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 short, front-loaded sentences; the critical no-scaling constraint and the anchor semantics come first, with no padding.

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 destructive mutation with no output schema this covers the core intent and one constraint, but omits what happens to existing cels/layer positions, whether changes are reversible, and error behavior for missing files — relevant gaps an agent would want.

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 only 25%, so the description must compensate and it does so for anchor, explaining the meaning and values (top_left/center) beyond the schema's bare default note. width, height and filename receive no semantic detail (units, whether the file must exist), so the low-coverage burden is only partly met.

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?

States a specific verb (resize) and resource (canvas) and immediately scopes it with 'WITHOUT scaling the artwork (adds or trims space),' which distinguishes it from scale_sprite and crop_sprite without opening any schema.

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 'without scaling' clause gives clear context for when this tool is the right choice versus scaling siblings, and anchor is explained. It stops short of naming the alternative tool or stating when-not (e.g. use scale_sprite to change artwork size).

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

Deploy Server

Other Tools