Skip to main content
Glama

resize_canvas

Destructive

Resize the canvas without scaling artwork by adding or trimming space, with top-left or center anchoring for existing content.

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`. New area is transparent, except on a
Background, where it is black, or the transparent palette index on an indexed sprite.

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": {
      "filename": "<filename>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "resize_canvas"
  }
}

Input 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

A3.5/5.0
Behavior3/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 usefully spells out the fill of the newly added area (transparent, black on a Background, transparent palette index on indexed sprites) and that it inherits create_sprite's dimension/area caps. What it does not disclose is the destructive side: that trimming space when reducing dimensions discards content, and whether that is silent or refused, which is the main risk for a destructiveHint tool.

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?

Two short paragraphs, front-loaded with the defining constraint, then the anchor behavior, then fill/cap details. Every sentence carries information; only the quoted default value duplicates the schema verbatim.

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 destructive mutation with no output schema, the definition covers the two things an agent most needs: the non-scaling semantics and the appearance of added area, plus size caps. The remaining gap is the consequence of shrinking (content loss), which would matter more if the annotation did not already flag destructiveHint.

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% and the one documented parameter ('anchor') just restates its default. The description adds real meaning for anchor (it positions existing content in the new canvas, with top_left default vs center), which the schema does not convey. Width/height units and whether 'filename' names an open document or an on-disk file remain unexplained in both places.

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?

Specific verb+resource with a scoping qualifier that does real work: 'Resize the canvas WITHOUT scaling the artwork (adds or trims space)' immediately separates this from a scale/transform operation. It does not name crop_sprite, the closest sibling conceptually, so the differentiation is implicit rather than explicit.

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?

The 'without scaling' framing implies when this is the right choice over a scale operation, but there is no explicit when-to-use/when-not statement and no named alternative. An agent must infer that cropping content is out of scope and that this tool operates on extent only.

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