Skip to main content
Glama

Resize Document

photopea_resize_document
Destructive

Resizes the active document canvas to new pixel dimensions and proportionally resamples all layer content to fit. This destructive edit can be reverted with undo.

Instructions

Resize the active document canvas to new pixel dimensions, resampling all layer content to fit. This is a destructive operation — all layers are scaled proportionally. Use undo to revert if needed.

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

Input Schema

NameRequiredDescriptionDefault
widthYesNew document width in pixels
heightYesNew document height in pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / height / description
      Previous value: -"New height in pixels"New value: +"New document height in pixels"
    • changedInput schema / properties / width / description
      Previous value: -"New width in pixels"New value: +"New document width in pixels"
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, so the safety profile is partly covered. The description still earns credit by explaining the concrete consequence — all layer content is resampled and layers are scaled proportionally — and by naming undo as the recovery path, which is behavior an agent could not derive from the annotations alone.

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?

Three short sentences, front-loaded with the action and immediately followed by the risk. There is mild redundancy between 'resampling all layer content to fit' and 'all layers are scaled proportionally', which restate the same consequence twice.

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 two-parameter tool with full schema coverage and annotations that carry the safety profile, the description supplies everything an agent needs: what is scaled, that it is destructive, and how to recover. Only the sibling disambiguation (resize_canvas vs crop) is left implicit.

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 description coverage is 100%, with both width and height documented as pixels and constrained to positive numbers, so the baseline is 3. The description adds only the confirmation that dimensions are pixel-based and applied to the document; it contributes no format, range, or interaction detail beyond the schema.

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?

Names a specific verb and resource ('Resize the active document canvas') and clarifies the mechanism ('resampling all layer content to fit'), which differentiates it in spirit from photopea_resize_canvas. However, it never names that sibling explicitly, so the agent must infer the distinction from the word 'resampling' rather than being told.

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?

Gives a clear condition for recovery ('Use undo to revert if needed') and warns that the operation is destructive, which nudges toward caution. It offers no explicit when-to-use versus when-not guidance and, critically, does not route to photopea_resize_canvas or photopea_crop for the non-resampling cases.

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