Skip to main content
Glama

Apply Adjustment

photopea_apply_adjustment

Apply destructive brightness, hue/saturation, levels, or curves adjustments directly to the active layer's pixels; select a target layer first and undo to revert changes.

Instructions

Apply a destructive image adjustment to the active layer's pixel data. Use select_layer to target a specific layer first. Modifies pixels directly — use undo to revert if needed.

Input Schema

NameRequiredDescriptionDefault
typeYesAdjustment type: 'brightness' for brightness/contrast, 'hue_sat' for hue/saturation/lightness, 'levels' for input levels, 'curves' for tone curves
settingsNoKey-value settings for the adjustment. For brightness: { brightness: -100..100, contrast: -100..100 }. For hue_sat: { hue: -180..180, saturation: -100..100, lightness: -100..100 }. For levels: { inputMin: 0..255, inputMax: 0..255, gamma: 0.1..9.99 }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • changedInput schema / properties / settings / description
      Previous value: -"Key-value settings for the adjustment. For brightness: { brightness: -100..100, contrast: -100..100 }. For hue_sat: { hue: -180..180, saturation: -100..100, lightness: -100..100 }. For levels: { inputBlack: 0..255, inputWhite: 0..255 }"New value: +"Key-value settings for the adjustment. For brightness: { brightness: -100..100, contrast: -100..100 }. For hue_sat: { hue: -180..180, saturation: -100..100, lightness: -100..100 }. For levels: { inputMin: 0..255, inputMax: 0..255, gamma: 0.1..9.99 }"
  2. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / settings / description
      Previous value: -"Adjustment settings (e.g. { brightness: 20, contrast: 10 })"New value: +"Key-value settings for the adjustment. For brightness: { brightness: -100..100, contrast: -100..100 }. For hue_sat: { hue: -180..180, saturation: -100..100, lightness: -100..100 }. For levels: { inputBlack: 0..255, inputWhite: 0..255 }"
    • changedInput schema / properties / type / description
      Previous value: -"Adjustment type"New value: +"Adjustment type: 'brightness' for brightness/contrast, 'hue_sat' for hue/saturation/lightness, 'levels' for input levels, 'curves' for tone curves"
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: pixels are rewritten in place, the operation is not idempotent in effect, and undo is the recovery route. The word 'destructive' sits in mild tension with destructiveHint=false, but the explicit undo note makes the intent recoverable-mutation clear rather than contradictory.

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 short sentences, zero filler, with the destructive nature and the target layer front-loaded ahead of the workflow hint. Every sentence carries information an agent needs.

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?

No output schema exists, so the description needn't cover return values, and it does cover targeting, mutation semantics and reversal. Minor gaps remain: what happens if no layer is selected, and whether masks or non-pixel layers are affected by the adjustment.

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 the enum and the settings object fully documented in the schema. The description adds no meaning beyond that — it does not mention which adjustment types exist or what the settings keys are, so baseline 3 applies.

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?

States a specific verb and resource ('apply a destructive image adjustment') and scopes it to the active layer's pixel data, which implicitly separates it from the non-destructive photopea_add_adjustment_layer sibling. It never names that sibling explicitly, so an agent must infer the contrast rather than read it.

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?

Gives a concrete prerequisite workflow ('Use select_layer to target a specific layer first') and a recovery path ('use undo to revert if needed'), which is clear context for invocation. It stops short of explicit exclusions — notably no guidance on when to prefer the non-destructive photopea_add_adjustment_layer instead.

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