What it does
target is "subject", "sky", "people" or "background": imagic finds it with the same AI Masking the desktop editor uses (a second or two per photo, on this machine). adjustments takes the same slider names as apply_adjustments, for example {"exposure": 15, "clarity": 10} on the subject and {"exposure": -20, "saturation": -15} on the background to separate the two. Frame-level keys (crop, rotation, fx_preset) are rejected; set those with apply_adjustments. mode "relative" (default) adds the values on top of the photo's current look, like a Lightroom mask. mode "isolated" renders the region from the original with only these values, so later global edits stop affecting it (the editor's layer default). Each layer is saved as an editor mask layer named after the target (or name): exports include it, and the photo reopens in the editor with the layer as its own tab. Calling again with the same target or name replaces that layer instead of stacking another; remove=true deletes it. Pass photo_id for one photo or photo_ids for several (each gets its own mask). Returns the mask's coverage (fraction of the frame) and the photo's layer list; get_photo_edits lists layers too. On a remote connection a long batch runs as a background job: poll get_job_status with the returned job_id.
Parameters
| Name | Type | Required |
|---|---|---|
target |
str |
required |
adjustments |
dict | None |
optional |
photo_id |
int | None |
optional |
photo_ids |
list[int] | None |
optional |
mode |
str |
optional |
name |
str | None |
optional |
remove |
bool |
optional |
Asking for it
You do not call this by name. You say what you want, and the agent picks the tool:
Point imagic at my shoot and tell me what you find.
The rest of the editing tools
Where it runs
On your machine. imagic's MCP server is a local process that your AI client starts; the photos never leave your disk and nothing is uploaded. That is true of every tool in the reference, including this one.
To call it you need an MCP client connected to imagic. Setup takes about three minutes for Claude Code, Cursor, VS Code, Codex, Gemini CLI and ten others.
Give your AI the whole pipeline
mask_adjust is one of 25 tools in imagic Max. The free 500-export trial includes all of them.