Skip to main content
Glama

generate_relight_variations

Generate four physically grounded relit image variations (Ambient, Dramatic, Rim, Mood) from a photo or render, with exposure and color balance logs written to disk.

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 text prompts targeting GPT Image or Nano Banana, 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 generated variation image files. If omitted, defaults to the server's configured cache directory ('./generated_variations').
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. 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"
      +}
  2. First observedv0.1.1

TDQS

A4.6/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 and does so thoroughly: it discloses filesystem mutation (creating up to 4 files), the overwrite-on-rerun hazard, determinism, unmetered local compute, no network egress, and no authentication requirement. This is precisely the mutation/reversibility/permission context an agent needs for a write 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?

Front-loaded with the outcome and variants, then organized into labelled bullets that each carry distinct routing or behavioral content. It is somewhat long and the 'Purpose: Visual image transformation' line is mildly redundant with the opening sentence, but overall the structure is efficient and scannable.

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?

An output schema exists, so return values need not be explained, and the description covers the remaining gaps: what gets written, where, the default output location via output_dir, the overwrite semantics, and the compute/auth profile. An agent has everything needed to invoke this correctly.

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

Parameters3/5

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

Schema description coverage is 100%, including per-enum EV and color-temperature details, so the schema already documents all three parameters. The description's lighting names and adjustment-log mention largely restate what the schema enumerates, adding no format or constraint detail beyond it. Baseline 3 applies when the schema does the heavy lifting.

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 opening sentence names a specific verb (Generate) and resource (relit image variations on disk), enumerates the four concrete variants produced, and states the auxiliary output (mathematical adjustment logs). It explicitly contrasts itself with analyze_optical_profile and synthesize_diffusion_prompt, so an agent can distinguish it from every relevant sibling without opening a schema.

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?

Provides explicit 'When to use', an enumerated 'When NOT to use' with the correct alternative named for each excluded case (analyze_optical_profile, harmonize_composite, synthesize_diffusion_prompt), and a dedicated Alternatives section including list_cached_variations. Nothing about tool selection is left to inference.

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