Skip to main content
Glama

canvas_size

Destructive

Extend the canvas: grow it and reposition the existing content within the larger frame. It never shrinks (use crop for that): REFUSED when either dimension would be smaller than the current one, and when neither dimension actually grows. Choose where the existing content lands with anchor (a 3x3 grid, default 'center') or explicit offset_x / offset_y; give one or the other, not both. fill sets a solid backdrop layer under the WHOLE canvas: white, black, a '#rrggbb' hex color (rendered as luminance on a grayscale photo), or transparent (the default, which adds no backdrop layer at all; see the field description for what that means at export time). IRREVERSIBLE in this session: there is no undo, so make a checkpoint first when in doubt. REFUSES when the photo has a masked filter, or any filter that came with the file, AND the existing content actually moves (offset_x / offset_y not both 0; a top-left anchor never moves anything): extend the canvas before adding masked filters, not after, because a filter's mask does not travel with the layer it confines when the canvas repositions it. An unmasked effect (a vignette and friends) is unaffected. On this server the new canvas must stay within the workspace's pixel limit (less at a higher bit depth).

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

Input Schema

NameRequiredDescriptionDefault
fillNo'white', 'black', a '#rrggbb' hex color, or 'transparent' (default — no fill layer is added at all; see the note on export_photo/flatten below). Any other choice is painted onto a new, full-canvas layer inserted at the BOTTOM of the whole stack — a solid backdrop behind every existing layer, not just the newly added area, so it also shows through any pre-existing transparency in those layers. On a GRAYSCALE image a hex color renders as its LUMINANCE (a weighted gray, not one channel picked out). transparent: genuinely transparent only in a live, layered document — export_photo (unless keep_alpha or a layered psd) and layer op=flatten flatten first, which fills any transparent area with the ambient background color (white, unchanged by this tool) and drops alpha, not with transparency. A non-transparent fill on an INDEXED image is REFUSED outright, before the canvas resizes at all — indexed has no backdrop layer type to add.transparent
imageYesImage id, as returned by open_photo.
widthYesNew canvas width, in pixels. Must be at least the current width, and at least one of width/height must actually be LARGER than the current size (both equal to the current size is refused — there is nothing to extend).
anchorNoWhere the existing content sits within the new, larger canvas — a 3x3 grid. Defaults to 'center' when neither this nor offset_x/offset_y is given. Mutually exclusive with offset_x/offset_y.
heightYesNew canvas height, in pixels. Must be at least the current height. See width.
offset_xNoExplicit horizontal offset (document pixels) for the existing content's left edge in the new canvas, instead of an anchor — must be between 0 and (new width - current width). Requires offset_y too; mutually exclusive with anchor.
offset_yNoExplicit vertical offset for the existing content's top edge, instead of an anchor — must be between 0 and (new height - current height). Requires offset_x too; mutually exclusive with anchor.

Output Schema

NameRequiredDescriptionDefault
widthNo
heightNo
offset_xNo
offset_yNo
mindset_notesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / editor_notes
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / mindset_notes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / editor_notes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / fill / description
      Previous value: -"'white', 'black', a '#rrggbb' hex color, or 'transparent' (default — no fill layer is added at all; see the note on export_photo/flatten below). Any other choice is painted onto a new, full-canvas layer inserted at the BOTTOM of the whole stack — a solid backdrop behind every existing layer, not just the newly added area, so it also shows through any pre-existing transparency in those layers. On a GRAYSCALE image a hex color renders as its LUMINANCE (a weighted gray, not one channel picked out). transparent: genuinely transparent only in a live, layered document — export_photo and layer op=flatten both flatten first, which fills any transparent area with the ambient background color (white, unchanged by this tool) and drops alpha, not with transparency. A non-transparent fill on an INDEXED image is REFUSED outright, before the canvas resizes at all — indexed has no backdrop layer type to add."New value: +"'white', 'black', a '#rrggbb' hex color, or 'transparent' (default — no fill layer is added at all; see the note on export_photo/flatten below). Any other choice is painted onto a new, full-canvas layer inserted at the BOTTOM of the whole stack — a solid backdrop behind every existing layer, not just the newly added area, so it also shows through any pre-existing transparency in those layers. On a GRAYSCALE image a hex color renders as its LUMINANCE (a weighted gray, not one channel picked out). transparent: genuinely transparent only in a live, layered document — export_photo (unless keep_alpha or a layered psd) and layer op=flatten flatten first, which fills any transparent area with the ambient background color (white, unchanged by this tool) and drops alpha, not with transparency. A non-transparent fill on an INDEXED image is REFUSED outright, before the canvas resizes at all — indexed has no backdrop layer type to add."
  4. Changed1 schema field changed
    • changedInput schema / properties / fill / description
      Previous value: -"'white', 'black', a '#rrggbb' hex color, or 'transparent' (default — no fill layer is added at all; see the note on export_photo/flatten below). Any other choice is painted onto a new, full-canvas layer inserted at the BOTTOM of the whole stack — a solid backdrop behind every existing layer, not just the newly added area, so it also shows through any pre-existing transparency in those layers. On a GRAYSCALE image a hex color renders as its LUMINANCE (a weighted gray, not one channel picked out). transparent: genuinely transparent only in a live, layered document (e.g. saved via save_project) — export_photo and layer op=flatten both flatten first, which fills any transparent area with the ambient background color (white, unchanged by this tool) and drops alpha, not with transparency. A non-transparent fill on an INDEXED image is REFUSED outright, before the canvas resizes at all — indexed has no backdrop layer type to add."New value: +"'white', 'black', a '#rrggbb' hex color, or 'transparent' (default — no fill layer is added at all; see the note on export_photo/flatten below). Any other choice is painted onto a new, full-canvas layer inserted at the BOTTOM of the whole stack — a solid backdrop behind every existing layer, not just the newly added area, so it also shows through any pre-existing transparency in those layers. On a GRAYSCALE image a hex color renders as its LUMINANCE (a weighted gray, not one channel picked out). transparent: genuinely transparent only in a live, layered document — export_photo and layer op=flatten both flatten first, which fills any transparent area with the ambient background color (white, unchanged by this tool) and drops alpha, not with transparency. A non-transparent fill on an INDEXED image is REFUSED outright, before the canvas resizes at all — indexed has no backdrop layer type to add."
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description adds substantial context beyond them: no undo in this session, recommend a `checkpoint` first, refusal when a masked or file-bundled filter would move, and a workspace pixel limit that tightens at higher bit depth. These are non-obvious operational constraints an agent cannot infer from the annotations.

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 and the shrink exclusion are front-loaded, and nearly every sentence carries a distinct constraint. However, it is a single dense paragraph with long parenthetical asides, which makes the refusal and filter-ordering rules harder to scan than they need to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, and the description still covers the mutation's irreversibility, refusal cases, layer-ordering effects of `fill`, and server-side size limits. For a destructive, multi-parameter canvas operation this is complete.

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 100%, so the schema already documents anchor, offset_x/offset_y, fill and dimension constraints in detail. The description restates much of that (mutual exclusivity of anchor vs offsets, fill options, default 'center') rather than adding new meaning, so it sits at the baseline for a fully documented schema.

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 and resource ('Extend the canvas: grow it and reposition the existing content') and explicitly excludes the opposite operation by naming `crop` for shrinking. An agent can distinguish this from `new_canvas`, `crop`, and `fill` without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-not conditions ('never shrinks (use `crop` for that)'), names the alternative, and even specifies ordering relative to other operations ('extend the canvas before adding masked filters, not after'). Refusal conditions are enumerated so the agent knows when not to call it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources