photoshop_auto_levels
Run Auto Levels on the active layer to fix flat images by setting black, white, and gray points automatically. Use for a one-shot tone correction; undo reverts it.
Instructions
Run Auto Levels on the active layer. Photoshop sets the black, white, and gray points; there is no amount parameter.
Users often say: fix flat image, auto tone, make it pop (mild).
Use when: a one-shot automatic level fix on the current layer. Do NOT use when: only contrast should move — use photoshop_auto_contrast. Do NOT use when: you want a specific brightness and contrast delta — use photoshop_adjust_brightness_contrast. Do NOT use when: the correction must stay an editable adjustment layer — use photoshop_adjust_curves.
Returns: confirmation that Auto Levels ran. Preconditions: active document and active layer. Text and Smart Objects are rasterized first. Side effects: destructive pixels, one history step. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | 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. |