Skip to main content
Glama

Set Layer Style

photopea_set_layer_style
Idempotent

Adds drop shadow, outer glow, or stroke effects to a Photopea layer by name or index. Replaces existing effects, keeps them editable, and conforms to the layer's shape for text and logos.

Instructions

Set a layer's effects: drop shadow, outer glow and/or stroke. Replaces the layer's existing effects; pass none to clear them. Effects stay editable and follow the layer's shape, which suits text and logos.

Input Schema

NameRequiredDescriptionDefault
strokeNo
targetNoLayer name (string) or index (number)
outerGlowNo
dropShadowNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations, it discloses the key mutation semantics: existing effects are replaced, effects can be cleared, and results remain editable and follow the layer's shape. That is meaningful context the idempotentHint/destructiveHint flags do not convey. Minor tension with destructiveHint=false given the replacement behavior, but it is disclosed rather than contradicted.

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 with the effect list front-loaded and the replacement warning immediately after, so the highest-risk detail is not buried. No filler sentences; nearly every clause carries information.

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 no-required-param, nested-object mutation tool with safety annotations and no output schema, the definition covers the critical unknown: that existing effects are overwritten or cleared. Remaining gaps (target resolution, error cases, whether the layer must be selected) are partially covered by the schema and are not decisive for correct invocation.

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 only 25% at the top level, so the description carries some burden; it names the three effect parameters in prose (dropShadow, outerGlow, stroke) which helps map them to argument names. However it says nothing about 'target' semantics, nested options, required color, or defaults, leaving the nested schema to do the heavy lifting.

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?

The description gives a specific verb and resource ('Set a layer's effects') and enumerates exactly which effects are covered: drop shadow, outer glow, stroke. That distinguishes it implicitly from photopea_set_layer_properties (fill/opacity/blend mode), but it never names that sibling, so the differentiation is left to inference.

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?

It states the replacement contract ('Replaces the layer's existing effects; pass none to clear them') and a concrete use case ('suits text and logos'), which tells an agent when this is the right tool. It stops short of saying when not to use it or which sibling to choose instead for non-effect layer properties.

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