Skip to main content
Glama

analyze_optical_profile

Extract physical optical metrics (CCT, light vector, luminance range) and optionally decompose an image into 6 analytical layers for lighting diagnostics.

Instructions

Extract physical optical metrics from an image, including Correlated Color Temperature (CCT in Kelvin), dominant 3D lighting vector (azimuth and elevation angles), photometric luminance dynamic range, contrast zones, surface normal roughness index, and optionally decompose into 6 analytical image layers in Layers/ directory.

• Purpose: Diagnostic optical extraction and 6-layer decomposition (Highlights, Shadows, Ambient Occlusion, Edges, Depth Normals, Chroma/Saturation). Unlike 'generate_relight_variations' which creates artistic relit renders, this tool extracts physical diagnostic metrics and visual analytical decomposition layers. • Behavior: Read-only by default; writes 6 analytical layer PNGs and Layer.md to the specified directory when 'extract_layers' is true. Unmetered local execution, zero network egress, zero external auth. • When to use: Use as the prerequisite first step to inspect baseline lighting conditions or generate the 6 diagnostic layers into Layers/ before relighting or prompting. • When NOT to use: Do NOT use if you need creative relighted styles (use 'generate_relight_variations'), if merging a cutout into a scene (use 'harmonize_composite'), or if you only need generative AI prompt synthesis (use 'synthesize_diffusion_prompt'). • Alternatives: Use 'generate_relight_variations' for creative lighting styles, or 'synthesize_diffusion_prompt' for model prompts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYesAbsolute or workspace-relative path to a local image file (.png, .jpg, or .jpeg). Must be an existing image under 50 MB.
layers_dirNoOptional target directory to store the 6 analytical layer images and Layer.md (defaults to 'Layers').
user_intentNoOptional creative or corrective intent to dynamically tailor layer diagnostics, recommendations, and diffusion prompts.
extract_layersNoIf true, decomposes image into 6 analytical layers (Highlights, Shadows, Ambient Occlusion, Edges, Depth Normals, Chroma/Saturation) saved to Layers/ directory and generates Layer.md.

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. Changed3 schema fields changedv1.0.5
    • addedInput schema / properties / extract_layers
      Added value: +{
      +  "description": "If true, decomposes image into 6 analytical layers (Highlights, Shadows, Ambient Occlusion, Edges, Depth Normals, Chroma/Saturation) saved to Layers/ directory and generates Layer.md.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / layers_dir
      Added value: +{
      +  "description": "Optional target directory to store the 6 analytical layer images and Layer.md (defaults to 'Layers').",
      +  "type": "string"
      +}
    • addedInput schema / properties / user_intent
      Added value: +{
      +  "description": "Optional creative or corrective intent to dynamically tailor layer diagnostics, recommendations, and diffusion prompts.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv1.0.2
    • changedInput schema / properties / image_path / description
      Previous value: -"Absolute or workspace-relative path to the image file."New value: +"Absolute or workspace-relative path to a local image file (.png, .jpg, or .jpeg). Must be an existing image under 50 MB."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "properties": {
      +        "colorTemperatureKelvin": {
      +          "description": "Correlated Color Temperature (CCT) in Kelvin.",
      +          "type": "number"
      +        },
      +        "contrastZones": {
      +          "properties": {
      +            "deepShadowsPct": {
      +              "type": "number"
      +            },
      +            "midtonesPct": {
      +              "type": "number"
      +            },
      +            "specularHighlightsPct": {
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "dimensions": {
      +          "description": "[width, height] in pixels.",
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        "dominantLightDirectionVector": {
      +          "description": "Normalized [X, Y, Z] vector.",
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        "imagePath": {
      +          "description": "Canonical resolved file path.",
      +          "type": "string"
      +        },
      +        "lightingAngles": {
      +          "properties": {
      +            "azimuthDeg": {
      +              "description": "Horizontal angle (0-360°).",
      +              "type": "number"
      +            },
      +            "elevationDeg": {
      +              "description": "Vertical elevation angle (0-90°).",
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "azimuthDeg",
      +            "elevationDeg"
      +          ],
      +          "type": "object"
      +        },
      +        "luminanceDynamics": {
      +          "properties": {
      +            "contrastRatio": {
      +              "type": "number"
      +            },
      +            "max": {
      +              "type": "number"
      +            },
      +            "median": {
      +              "type": "number"
      +            },
      +            "min": {
      +              "type": "number"
      +            },
      +            "p5": {
      +              "type": "number"
      +            },
      +            "p95": {
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "meanLuminance": {
      +          "description": "Average photometric luminance (0-255).",
      +          "type": "number"
      +        },
      +        "opticalProfileSummary": {
      +          "description": "Executive summary sentence.",
      +          "type": "string"
      +        },
      +        "surfaceNormalVariation": {
      +          "description": "Roughness metric (std dev of normals).",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "imagePath",
      +        "dimensions",
      +        "colorTemperatureKelvin",
      +        "dominantLightDirectionVector",
      +        "lightingAngles",
      +        "meanLuminance",
      +        "luminanceDynamics",
      +        "contrastZones",
      +        "surfaceNormalVariation",
      +        "opticalProfileSummary"
      +      ],
      +      "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.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 of behavioral disclosure, and it succeeds: it states that the tool is read-only by default, writes six analytical PNGs and Layer.md only when 'extract_layers' is true, and confirms local unmetered execution with zero network egress and zero external auth. This is unusually thorough behavioral transparency.

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 well-structured with clear labeled sections and front-loaded purpose. However, there is some redundancy: the 'Purpose' bullet largely repeats the opening sentence, and the 'Alternatives' section repeats the sibling names already given in 'When NOT to use'. This slight repetition keeps it from a perfect score.

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 availability of an output schema, 100% schema description coverage, and the tool's moderate complexity, the description covers the essential context: purpose, distinction from siblings, side-effect behavior, execution environment, and when to avoid the tool. There are no significant gaps that would prevent correct invocation.

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 coverage is 100%, so the input schema already documents all four parameters. The description adds useful high-level context about layer decomposition and the 'Layers/' directory, but it does not materially extend the meaning of parameters beyond what the schema already states. Thus the baseline score of 3 is appropriate.

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 ('Extract physical optical metrics from an image') and enumerates concrete outputs such as CCT, lighting vector angles, luminance range, and contrast zones. It also explicitly contrasts itself with 'generate_relight_variations', making the tool's diagnostic vs. artistic purpose unmistakable.

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' section, a 'When NOT to use' section naming three alternative sibling tools with their appropriate contexts, and an 'Alternatives' section. An agent can confidently route between this tool and its siblings without external inference.

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