Skip to main content
Glama

photoshop_scale_layer

Destructive

Scale the active layer by a percentage, with optional center anchoring. Use for precise layer resizing without altering the document canvas.

Instructions

Scale the active layer by a percentage (100 leaves the size unchanged). centerAnchor true (default) scales from the center; false scales from the top-left.

Use when: a numeric percent scale on one layer. Do NOT use when: the layer should fit the canvas automatically — use photoshop_fit_layer_to_document. Do NOT use when: the document dimensions should change — use photoshop_resize_image. Do NOT use when: the layer has no pixels yet — fill it first. An empty layer fails with an empty bounding rectangle.

Returns: the scale percent applied. Preconditions: active document and active layer. Side effects: transforms that layer, one history step. 100% does not change size; any other percent is not idempotent. Reversible with photoshop_undo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesPhotoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call.
centerAnchorNoScale from center (true) or top-left (false). Default: true
scalePercentYesScale percentage (e.g., 50 for 50%, 200 for 200%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.33
    • changedInput schema / properties / document_id / description
      Previous value: -"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null to use the active document. A number activates that document before the tool runs."New value: +"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call."
  2. Changed4 schema fields changedv1.7.32
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / document_id / description
      Previous value: -"Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit."New value: +"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null to use the active document. A number activates that document before the tool runs."
    • changedInput schema / properties / document_id / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "scalePercent"
      -]New value: +[
      +  "scalePercent",
      +  "document_id"
      +]
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=false, so the safety profile is partly covered, but the description adds meaningful context beyond them: required preconditions (active document and layer), the empty-layer-bounding-rect failure mode, the "one history step" cost, and that any percent other than 100 is non-idempotent and reversible via photoshop_undo. It does not, however, describe authorization or performance/rate characteristics.

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?

Front-loaded with the core action, then organized into scannable Use/Do-not-use/Returns/Preconditions/Side-effects blocks that map onto how an agent decides to call it. Slight redundancy (the 100%-no-op fact appears twice) and a few of the preconditions restate schema defaults.

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?

For a 3-param mutation with no output schema, the description covers the return value, preconditions, side effects, failure mode, and reversal path, leaving nothing an agent needs before invoking it. Complexity is low and coverage is proportionate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns a bump by clarifying that 100 is a true no-op and by restating the center-vs-top-left anchor semantics in behavioral terms rather than just field labels. The centerAnchor meaning largely duplicates the schema text, so it is not fully additive.

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 a precise verb+resource+unit ("Scale the active layer by a percentage") and immediately disambiguates from siblings like photoshop_fit_layer_to_document and photoshop_resize_image. An agent can distinguish the three scaling/moving tools without opening any 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?

It provides an explicit "Use when" and three explicit "Do NOT use when" branches, each naming the alternative tool that should be used instead (fit_layer_to_document, resize_image) plus the condition that selects it (no pixels yet). Routing is fully determined.

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

Deploy Server

Other Tools