Skip to main content
Glama

batch_apply_develop_operations

Apply multiple Lightroom Classic develop operations in sequence to automate photo editing workflows. Run presets, settings, parameters, or groups in a single batch process with configurable error handling.

Instructions

Run multiple preset/settings/parameter/group operations in sequence.

Each operation is a dict with one of: preset, settings, parameter, or group. Examples: [{"preset": "portrait_clean"}, {"settings": {"Exposure": 0.3}}, {"parameter": "Contrast", "value": 20}] Operations run in order. Use stop_on_error=True to halt on first failure. default_local_ids applies to all operations unless overridden per-operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes
default_local_idsNo
strictNo
clampNo
stop_on_errorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the batch_apply_develop_operations tool, which iterates through a list of operations, resolves them using _resolve_batch_operation, and applies them sequentially via _apply_validated_settings.
    async def batch_apply_develop_operations(
        operations: list[dict[str, Any]],
        default_local_ids: list[int] | None = None,
        strict: bool = False,
        clamp: bool = True,
        stop_on_error: bool = False,
    ) -> dict[str, Any]:
        """Run multiple preset/settings/parameter/group operations in sequence.
    
        Each operation is a dict with one of: preset, settings, parameter, or group.
        Examples:
          [{"preset": "portrait_clean"}, {"settings": {"Exposure": 0.3}}, {"parameter": "Contrast", "value": 20}]
        Operations run in order. Use stop_on_error=True to halt on first failure.
        default_local_ids applies to all operations unless overridden per-operation.
        """
        if not isinstance(operations, list) or not operations:
            raise ValueError("operations must be a non-empty list")
    
        results: list[dict[str, Any]] = []
        succeeded = 0
        failed = 0
    
        for index, operation in enumerate(operations):
            if not isinstance(operation, dict):
                err = "operation must be an object"
                failed += 1
                results.append({"index": index, "success": False, "error": err})
                if stop_on_error:
                    break
                continue
    
            try:
                mode, settings, target = _resolve_batch_operation(operation)
                op_local_ids = operation.get("local_ids", default_local_ids)
                op_history = operation.get("history_name")
                if op_history is not None and not isinstance(op_history, str):
                    raise ValueError("history_name must be a string when provided")
    
                response = await _apply_validated_settings(
                    settings,
                    local_ids=op_local_ids,
                    strict=strict,
                    clamp=clamp,
                    history_name=op_history,
                )
                record: dict[str, Any] = {
                    "index": index,
                    "success": True,
                    "mode": mode,
                    "result": response,
                }
                if target:
                    record["target"] = target
                results.append(record)
                succeeded += 1
            except Exception as exc:
                failed += 1
                results.append(
                    {
                        "index": index,
                        "success": False,
                        "error": str(exc),
                    }
                )
                if stop_on_error:
                    break
    
        return {
            "requested": len(operations),
            "succeeded": succeeded,
            "failed": failed,
            "stop_on_error": bool(stop_on_error),
            "results": results,
        }
  • Registration of the batch_apply_develop_operations function as an MCP tool.
    @mcp.tool()
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: operations run sequentially, error handling via 'stop_on_error', and default application of 'default_local_ids'. However, it doesn't cover permissions, side effects, rate limits, or what constitutes a 'failure'—significant gaps for a batch operation tool.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose. Each sentence adds value: the first states the action, the second defines operation structure, the third gives examples, and the fourth covers execution order and key parameters. No wasted words, though minor formatting could improve readability.

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

Completeness4/5

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

Given 5 parameters with 0% schema coverage, no annotations, but an output schema exists, the description does well. It explains the complex 'operations' array and key parameters like 'stop_on_error' and 'default_local_ids', though it omits 'strict' and 'clamp'. The output schema relieves it from detailing return values, making it reasonably complete for the context.

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?

Schema description coverage is 0%, so the description must compensate. It effectively explains 'operations' with examples and structure, clarifies 'default_local_ids' application, and mentions 'stop_on_error' behavior. It doesn't address 'strict' or 'clamp' parameters, but covers the most complex ones well, adding substantial meaning beyond the bare schema.

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 tool's purpose: 'Run multiple preset/settings/parameter/group operations in sequence.' It specifies the verb ('run') and resources ('operations'), though it doesn't explicitly differentiate from sibling tools like 'apply_develop_preset' or 'apply_develop_settings' beyond implying batch capability.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning operation types and examples, but doesn't explicitly state when to use this tool versus alternatives like individual apply tools. It provides some operational guidance (e.g., 'stop_on_error=True to halt on first failure'), but lacks clear when/when-not directives or named sibling comparisons.

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