Skip to main content
Glama

create_ai_mask

Create AI-powered masks in Lightroom Classic to isolate subjects, skies, backgrounds, or other elements for precise photo editing adjustments.

Instructions

Create an AI-powered mask on the active photo.

mask_type: subject, sky, background, person, object, depth, luminance, color operation: new (default), add, subtract, intersect

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mask_typeYes
operationNonew

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the create_ai_mask tool, which calls the underlying "masks.create_ai_mask" service.
    async def create_ai_mask(
        mask_type: str,
        operation: str = "new",
    ) -> dict[str, Any]:
        """Create an AI-powered mask on the active photo.
    
        mask_type: subject, sky, background, person, object, depth, luminance, color
        operation: new (default), add, subtract, intersect
        """
        if not mask_type:
            raise ValueError("mask_type is required")
        return await _call("masks.create_ai_mask", {
            "mask_type": mask_type,
            "operation": operation,
        })
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Create') but lacks details on permissions, side effects (e.g., whether it modifies the photo permanently), error conditions, or response format. The mention of 'AI-powered' hints at automation but doesn't clarify reliability or limitations. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, with the first sentence stating the core purpose and the subsequent lines efficiently detailing parameters. Every sentence earns its place by providing essential information without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (AI-powered mask creation with parameters), lack of annotations, and presence of an output schema, the description is partially complete. It covers the purpose and parameters well but misses behavioral context like side effects or error handling. The output schema likely handles return values, so that gap is acceptable, but overall it's minimally adequate with clear room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant value beyond the input schema, which has 0% description coverage. It lists all valid values for 'mask_type' (subject, sky, background, person, object, depth, luminance, color) and 'operation' (new, add, subtract, intersect), including the default for 'operation'. This fully compensates for the schema's lack of documentation, making parameter meanings clear despite the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create an AI-powered mask') and specifies the target resource ('on the active photo'). It distinguishes itself from sibling tools like 'invert_mask', 'select_mask', or 'toggle_mask_overlay' by focusing on AI-powered creation rather than manipulation or selection of existing masks. However, it doesn't explicitly differentiate from all possible mask-related operations in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active photo), exclusions, or comparisons with sibling tools like 'invert_mask' or 'select_mask'. The context is implied ('on the active photo'), but explicit usage instructions are absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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