Skip to content

Edit

MCP tools that change how photos look. Every change is one undoable step in DarkRay.

Change edit settings. Change edit settings on photos by field name (from get_edits): values sets them, adjust adds to each photo’s own value (stopping at the range), reset puts whole sections back to their defaults first. Out-of-range values are refused. One undoable step.

Bridge method: edits.set

Parameter Type Required Details
ids array of integer yes Photo ids from search_photos (at most 1000). Not empty, at most 1000 items.
values object Field name to new value.
adjust object Number field name to the amount to add.
reset array of string Section names to reset.
catalog string A catalog from list_catalogs; omitted, the one DarkRay shows.

Python: app.set_edits(…)

from darkray_bridge import DarkRay
with DarkRay.connect() as app:
ids = [photo.id for photo in app.iter_photos("camera:X-T5 iso:>3200")]
# values sets fields; adjust adds to each photo's own value, stopping at the range.
done = app.set_edits(ids, values={"shadows": 25, "sharpen_enabled": True, "sharpen.amount": 40},
adjust={"exposure_ev": 0.33})
if done["limited"]:
print("Hit the end of a range:", done["limited"])
# reset puts whole sections back to their defaults first.
app.set_edits(ids, reset=["glow", "halation"])

Apply a preset or look. Apply a section preset, or a look with its amount, to photos (names from list_presets). One undoable step.

Bridge method: edits.apply_preset

Parameter Type Required Details
ids array of integer yes Photo ids from search_photos (at most 1000). Not empty, at most 1000 items.
preset object Fields: section, name.
look object Fields: id, amount.
catalog string A catalog from list_catalogs; omitted, the one DarkRay shows.

Python: app.apply_preset(…)

from darkray_bridge import DarkRay
with DarkRay.connect() as app:
ids = [photo.id for photo in app.iter_photos("kw:street rating:>=3")]
# A section preset, by its section and name (from list_presets).
app.apply_preset(ids, preset={"section": "color_grade", "name": "Teal & Orange"})
# A look, by its id, at 60%.
app.apply_preset(ids, look={"id": "portra", "amount": 60})

Copy edits. Copy one photo’s edits to others, all of them or only some sections. One undoable step.

Bridge method: edits.copy

Parameter Type Required Details
source integer yes A photo id from search_photos. Min 1.
to array of integer yes Photo ids from search_photos (at most 1000). Not empty, at most 1000 items.
sections array of string Only these sections.
catalog string A catalog from list_catalogs; omitted, the one DarkRay shows.

Python: app.copy_edits(…)

from darkray_bridge import DarkRay
with DarkRay.connect() as app:
shoot = [photo.id for photo in app.iter_photos("kw:headshots date:2026-09-14")]
hero, rest = shoot[0], shoot[1:]
# Everything, as Paste Edits copies it.
app.copy_edits(hero, rest)
# Or only some sections.
app.copy_edits(source=hero, to=rest, sections=["basic", "color_grade"])

Make virtual copies. Make one virtual copy of each photo, to edit separately from it. Undoable.

Bridge method: photos.virtual_copy

Parameter Type Required Details
ids array of integer yes Photo ids from search_photos (at most 1000). Not empty, at most 1000 items.
catalog string A catalog from list_catalogs; omitted, the one DarkRay shows.

Python: app.make_virtual_copy(…)

from darkray_bridge import DarkRay
with DarkRay.connect() as app:
ids = [photo.id for photo in app.iter_photos("flag:pick kw:portrait")]
# One copy of each photo, to try a black-and-white version beside the color one.
copies = [c["id"] for c in app.make_virtual_copy(ids)]
app.set_edits(copies, values={"monochrome_enabled": True})