add_to_collection
Add selected photos to a Lightroom Classic collection for organized catalog management and workflow automation.
Instructions
Add selected photos (or specific local_ids) to a collection.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | ||
| local_ids | No |
Implementation Reference
- The handler implementation for the 'add_to_collection' tool, which uses the MCP decorator and calls the underlying Lightroom catalog service.
@mcp.tool() async def add_to_collection( collection_id: int, local_ids: list[int] | None = None, ) -> dict[str, Any]: """Add selected photos (or specific local_ids) to a collection.""" ids = validate_local_ids(local_ids) payload: dict[str, Any] = {"collection_id": collection_id} if ids: payload["local_ids"] = ids return await _call("catalog.add_to_collection", payload)