set_rating
Assign star ratings (0-5) to photos in Lightroom Classic to organize and filter your catalog based on quality or preference.
Instructions
Set Lightroom star rating (0..5).
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": {
"rating": "<rating>"
},
"name": "set_rating"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rating | Yes | ||
| local_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The `set_rating` tool handler that validates the rating and calls the underlying bridge metadata command.
async def set_rating(rating: int, local_ids: list[int] | None = None) -> dict[str, Any]: """Set Lightroom star rating (0..5).""" payload = { "rating": validate_rating(rating), } ids = validate_local_ids(local_ids) if ids: payload["local_ids"] = ids return await _call("metadata.set_rating", payload)