open_photo
Open a photo and get its image id, which every other tool uses. source is an upload handle "upload:" (from request_upload), the name of one of your uploads, "latest" for the newest upload ("latest:2" the one before it), the download_url of one of your exports (a way back to a version you exported, for example after a photo was lost), or a public https:// image URL the server downloads itself (a photo share link works). It never opens a file path. Accepts JPEG, PNG, TIFF, WebP and HEIC, and RAW camera files on the larger workspace (the optional raw object sets white balance, exposure and highlights for a RAW file). A source can also be one of the built-in sample photos, listed by inspect what=uploads (sample:<name>, or its file name when none of your uploads has it). precision promotes bit depth before grading (16-bit only up to a size limit that overview lists). Up to 2 photos stay open at once: opening another saves and closes the one used least recently, which reopens by itself, edits intact, the next time a tool names it. Uploads and open photos belong to this server; a photo opened through another Editmamei connector stays with that connector.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "open_photo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Only for a RAW camera file (an error for any other source): how it is developed. White balance, exposure and highlight recovery; each is optional. | |
| source | Yes | "upload:<upload_id>" as returned by the upload (the name of one of your uploads also works), or an https:// image URL. | |
| precision | No | Promote bit depth on open. 'keep' leaves the file's own precision; '16' converts to 16-bit BEFORE any grading, which avoids banding from an aggressive tone move on an 8-bit source. On this server '16' is refused above a size limit (memory); overview lists it. | keep |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | No | ||
| width | No | ||
| height | No | ||
| layers | No | ||
| base_type | No | ||
| precision | No | ||
| color_profile | No | The image's color space: space is srgb, display-p3, dci-p3, adobe-rgb, prophoto-rgb, rec2020, gray or other; name is the profile's own name (null for plain sRGB); wide_gamut is true when the space holds colors sRGB cannot show. |