Skip to main content
Glama

Transform Layer

photopea_transform_layer

Scale, rotate, or flip image layers in-place to resize and reorient content. Modify layer dimensions, rotation, and mirror effects with precise parameters within Photopea.

Instructions

Scale, rotate, or flip a layer in-place. Modifies the layer's pixel data destructively. Use get_layers to check current layer bounds before transforming, and undo to revert if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesLayer name (string) or index (number)
scaleXNoHorizontal scale factor (1.0 = no change, 0.5 = half size, 2.0 = double size)
scaleYNoVertical scale factor (1.0 = no change, 0.5 = half size, 2.0 = double size)
rotationNoRotation angle in degrees (positive = clockwise, negative = counter-clockwise)
flipHNoFlip the layer horizontally (mirror left-right)
flipVNoFlip the layer vertically (mirror top-bottom)
Behavior1/5

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

The description states 'Modifies the layer's pixel data destructively,' but the annotations declare 'destructiveHint: false.' This is a direct contradiction between the description text and the structured metadata. The description also adds 'in-place' context, but the contradiction on destructiveness is a critical failure.

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 sentences structured optimally: action definition, behavioral disclosure, and usage prerequisites. Every sentence provides distinct value with no redundancy. The front-loading of the action verb allows immediate comprehension.

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 pixel operation without output schema, the description adequately covers prerequisites (get_layers) and recovery (undo). Could improve by mentioning error handling for invalid target layers, but the workflow guidance is sufficient for agent decision-making.

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?

With 100% schema description coverage, the schema fully documents all parameters (scaleX/Y, rotation, flipH/V). The description references the operations (scale, rotate, flip) but does not add syntax details or semantic constraints beyond what the schema already provides, meeting the baseline for high-coverage schemas.

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?

The description opens with specific verbs (Scale, rotate, or flip) and the resource (layer), clearly distinguishing this from sibling tools like move_layer (position change), resize_document (canvas change), or set_layer_properties (attribute changes). The 'in-place' qualifier further clarifies the scope.

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?

Explicitly names prerequisite tool 'get_layers' for checking bounds before transforming, and recovery mechanism 'undo' for reverting changes. This provides clear workflow guidance: check → transform → revert-if-needed.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/attalla1/photopea-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server