set_caption
Add descriptive captions to selected photos in Lightroom Classic to organize and document your image collection.
Instructions
Set Lightroom caption metadata for selected photos or local_ids.
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": {
"caption": "<caption>"
},
"name": "set_caption"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caption | Yes | ||
| local_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The `set_caption` tool handler is decorated with `@mcp.tool()` and executes a call to the Lightroom metadata API via `_call("metadata.set_caption", payload)`.
@mcp.tool() async def set_caption(caption: str, local_ids: list[int] | None = None) -> dict[str, Any]: """Set Lightroom caption metadata for selected photos or local_ids.""" payload: dict[str, Any] = {"caption": str(caption)} ids = validate_local_ids(local_ids) if ids: payload["local_ids"] = ids return await _call("metadata.set_caption", payload)