Skip to main content
Glama

generate_relight_variations

Generate four physically grounded relit image variations using ambient, dramatic, rim, or mood lighting presets, with exposure and color balance logs. Renders tangible lighting alternatives directly to disk for comparison.

Instructions

Generate 4 physically-grounded relit image variations on disk (Ambient fill, Dramatic chiaroscuro, Rim light halo, Mood golden-hour) with mathematical adjustment logs detailing exposure compensation (EV stops) and color balance.

• Purpose: Visual image transformation. Unlike 'analyze_optical_profile' which is read-only, this tool renders and writes concrete image files to the destination directory. Unlike 'synthesize_diffusion_prompt', it produces immediate local image files. • Behavior: Mutates filesystem by creating up to 4 image files in the output directory. Deterministic, unmetered local compute, no network egress, no authentication required. Re-running overwrites previous variations with the same base name. • When to use: Use when you need tangible image alternatives of a photo or product render with alternative lighting schemes. • When NOT to use: Do NOT use if you only need optical metrics (use 'analyze_optical_profile'), if blending a cutout into a background (use 'harmonize_composite'), or if you need diffusion AI text prompts (use 'synthesize_diffusion_prompt'). • Alternatives: Use 'synthesize_diffusion_prompt' for your Image Generator (GEMINI Nano Banana / Universal), or 'list_cached_variations' to browse existing outputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYesPath to the input image (.png, .jpg, .jpeg) to relight.
output_dirNoDestination folder for output files. If omitted, defaults to the server's configured cache directory ('./Layers'). Only 'Layers/' is used.
target_lightingNoLighting preset selection: 'Ambient' (+0.8 EV lifted shadows, 5500K daylight), 'Dramatic' (-1.5 EV shadow crush, chiaroscuro S-curve), 'Rim' (+1.2 EV normal curvature perimeter halo), 'Mood' (3200K tungsten amber shift, highlight bloom), or 'All' to generate all four simultaneously. Defaults to 'All'.All

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
statusYesExecution status.
summaryYesHuman-readable executive summary of the operation.
evidenceYes
warningsYesNon-fatal warnings if applicable.
nextActionsYesActionable follow-up guidance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.5
    • changedInput schema / properties / output_dir / description
      Previous value: -"Destination folder for generated variation image files. If omitted, defaults to the server's configured cache directory ('./generated_variations')."New value: +"Destination folder for output files. If omitted, defaults to the server's configured cache directory ('./Layers'). Only 'Layers/' is used."
  2. Changed5 schema fields changedv1.0.2
    • changedInput schema / properties / image_path / description
      Previous value: -"Path to the source image."New value: +"Path to the input image (.png, .jpg, .jpeg) to relight."
    • addedInput schema / properties / output_dir / default
      Added value: +""
    • changedInput schema / properties / output_dir / description
      Previous value: -"Custom output directory. If omitted, uses default cache directory."New value: +"Destination folder for generated variation image files. If omitted, defaults to the server's configured cache directory ('./generated_variations')."
    • changedInput schema / properties / target_lighting / description
      Previous value: -"Lighting preset: 'Ambient', 'Dramatic', 'Rim', 'Mood', or 'All'."New value: +"Lighting preset selection: 'Ambient' (+0.8 EV lifted shadows, 5500K daylight), 'Dramatic' (-1.5 EV shadow crush, chiaroscuro S-curve), 'Rim' (+1.2 EV normal curvature perimeter halo), 'Mood' (3200K tungsten amber shift, highlight bloom), or 'All' to generate all four simultaneously. Defaults to 'All'."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "properties": {
      +        "originalImage": {
      +          "type": "string"
      +        },
      +        "outputDir": {
      +          "type": "string"
      +        },
      +        "totalVariations": {
      +          "type": "number"
      +        },
      +        "variations": {
      +          "items": {
      +            "properties": {
      +              "adjustmentsApplied": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "evShiftStops": {
      +                "type": "number"
      +              },
      +              "fileSizeBytes": {
      +                "type": "number"
      +              },
      +              "imagePath": {
      +                "type": "string"
      +              },
      +              "presetName": {
      +                "type": "string"
      +              },
      +              "targetCctKelvin": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "presetName",
      +              "imagePath",
      +              "fileSizeBytes",
      +              "evShiftStops",
      +              "targetCctKelvin",
      +              "adjustmentsApplied"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "originalImage",
      +        "outputDir",
      +        "totalVariations",
      +        "variations"
      +      ],
      +      "type": "object"
      +    },
      +    "evidence": {
      +      "properties": {
      +        "artifacts": {
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "uri": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "inputsDigest": {
      +          "description": "SHA-256 digest of input parameters.",
      +          "type": "string"
      +        },
      +        "sources": {
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "uri": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "description": "Actionable follow-up guidance.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "description": "Execution status.",
      +      "enum": [
      +        "success",
      +        "partial",
      +        "blocked",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "summary": {
      +      "description": "Human-readable executive summary of the operation.",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "Non-fatal warnings if applicable.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "summary",
      +    "data",
      +    "warnings",
      +    "evidence",
      +    "nextActions"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.1

TDQS

A4.9/5.0
Behavior5/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 all relevant behavioral traits: 'Mutates filesystem by creating up to 4 image files', 'Deterministic, unmetered local compute, no network egress, no authentication required', and 'Re-running overwrites previous variations with the same base name.' It also mentions the output format (logs with EV stops and color balance). This is comprehensive and transparent.

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 longer than average but every section serves a purpose: purpose, behavior, when-to-use, when-not-to-use, alternatives. It is front-loaded with the main action and the scoping 'on disk' immediately. Some slight redundancy (e.g., 'produces immediate local image files' appears twice) but no filler. It earns a 4 rather than a 5 due to minor repetition.

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

Completeness5/5

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

Given the tool writes files, has an output schema, and no annotations, the description covers all necessary context: mutation, overwrite, determinism, network/auth, parameter semantics, and usage alternatives. It even preempts common misuse. Nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds substantial meaning beyond the schema. For each lighting preset it provides specific EV adjustments and color temperatures (e.g., 'Ambient (+0.8 EV lifted shadows, 5500K daylight)'), which is not in the schema. It also clarifies the output_dir behavior: 'Only 'Layers/' is used', a constraint not evident from the schema. This far exceeds the baseline 3.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Generate 4 physically-grounded relit image variations on disk' with named lighting presets. It explicitly contrasts with siblings: 'Unlike analyze_optical_profile which is read-only, this tool renders and writes concrete image files' and 'Unlike synthesize_diffusion_prompt, it produces immediate local image files.' This unambiguously identifies the tool's role and differentiates it.

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

Usage Guidelines5/5

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

The description provides a dedicated 'When to use' and 'When NOT to use' section, naming exact alternatives for each exclusion: 'analyze_optical_profile' for metrics, 'harmonize_composite' for blending, 'synthesize_diffusion_prompt' for diffusion prompts. It also lists alternatives in a separate section. This is explicit, exhaustive guidance with zero ambiguity.

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