Skip to main content
Glama

Transform Layer

photopea_transform_layer

Scale, rotate, or flip a layer in-place with destructive pixel modification. Check layer bounds beforehand using get_layers and undo if needed.

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 annotations set destructiveHint to false. This contradiction undermines transparency, as per the scoring rule for annotation contradictions.

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?

The description is concise with two sentences: the first defines the core action, and the second provides usage tips. No redundant information is present.

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?

The description adequately covers the purpose, destructive nature, pre-use check, and undo capability. However, it lacks details about immediate application and potential effects on layers beyond pixel data.

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?

The input schema covers all 6 parameters with clear descriptions, achieving 100% coverage. The description adds no further parameter details, so a baseline score of 3 is appropriate.

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 clearly specifies the tool's purpose: scaling, rotating, or flipping a layer in-place. It explicitly states the operation is destructive, distinguishing it from other layer manipulation tools like move_layer or set_layer_properties.

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 description provides actionable guidance by suggesting using get_layers to check bounds before transforming and using undo to revert. However, it does not explicitly mention when not to use this tool or compare it to alternatives.

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