set_label
Assign or remove color label names to organize photos in Lightroom Classic for efficient catalog management and workflow automation.
Instructions
Set Lightroom color label name (or empty string to clear).
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": {
"label": "<label>"
},
"name": "set_label"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| local_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The tool 'set_label' is registered using the @mcp.tool() decorator and its handler implementation directly calls the metadata.set_label MCP backend method.
@mcp.tool() async def set_label(label: str, local_ids: list[int] | None = None) -> dict[str, Any]: """Set Lightroom color label name (or empty string to clear).""" if label is None: raise ValueError("label must be a string") payload: dict[str, Any] = {"label": str(label)} ids = validate_local_ids(local_ids) if ids: payload["local_ids"] = ids return await _call("metadata.set_label", payload)