Skip to main content
Glama

add_keywords

Add hierarchical keywords to photos in Lightroom Classic to organize and categorize your catalog for efficient searching and filtering.

Instructions

Add keywords (supports hierarchical format: A > B > C).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordsYes
local_idsNo

Implementation Reference

  • The `add_keywords` tool is defined as an MCP tool using the `@mcp.tool()` decorator. It validates the input keywords and local_ids, creates a payload, and calls the internal `_call` function with the `metadata.add_keywords` command to interact with the Lightroom bridge.
    async def add_keywords(keywords: list[str], local_ids: list[int] | None = None) -> dict[str, Any]:
        """Add keywords (supports hierarchical format: A > B > C)."""
        if not keywords:
            raise ValueError("keywords cannot be empty")
        payload: dict[str, Any] = {"keywords": [str(k) for k in keywords]}
        ids = validate_local_ids(local_ids)
        if ids:
            payload["local_ids"] = ids
        return await _call("metadata.add_keywords", payload)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/4xiomdev/lightroom-classic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server