Skip to main content
Glama

analyze_optical_profile

Extract optical metrics like color temperature and light vectors from an image to assess baseline lighting before relighting or compositing.

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, and surface normal roughness index.

• Purpose: Diagnostic optical extraction. Unlike 'generate_relight_variations', this tool produces no image files, and unlike 'synthesize_diffusion_prompt', it returns pure numerical color-science data rather than text prompts. • Behavior: Completely read-only, deterministic, zero filesystem modifications, no network egress, and no authentication required. • When to use: Use as the prerequisite first step before relighting, inpainting, or compositing an image to inspect baseline lighting conditions. • When NOT to use: Do NOT use if you need modified image files on disk (use 'generate_relight_variations'), if merging a cutout into a scene (use 'harmonize_composite'), or if you need generative AI prompts (use 'synthesize_diffusion_prompt'). • Alternatives: Use 'generate_relight_variations' for visual lighting files, 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.

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. 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"
      +}
  2. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does so thoroughly: read-only, deterministic, zero filesystem modifications, no network egress, no authentication required. It also discloses that no image files are produced. This covers the safety and side-effect profile completely.

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 core purpose in the first sentence, then structured into labeled bullets (Purpose, Behavior, When to use, When NOT to use, Alternatives). Well organized, though somewhat verbose with mild redundancy between the Purpose and Alternatives bullets.

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?

For a single-parameter deterministic read tool with an output schema, the description provides everything needed: purpose, side-effect profile, prerequisites, and sibling routing. Return value details are appropriately left to the output schema.

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 coverage is 100% and the single parameter is fully documented in the schema (path types, format, size limit). The description doesn't add parameter syntax beyond that, so it sits at the schema-done baseline, slightly elevated because the description frames the operational precondition (baseline inspection) that motivates supplying the path.

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 names a specific verb (Extract) and resource (physical optical metrics from an image), then enumerates the exact metrics returned (CCT, lighting vector, dynamic range, contrast zones, roughness index). It explicitly distinguishes itself from two siblings, generate_relight_variations and synthesize_diffusion_prompt, so an agent can route without opening either 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?

It explicitly states when to use (prerequisite first step before relighting, inpainting, compositing) and when not to use with named sibling alternatives for each exclusion case. The Alternatives section reinforces the routing. This is about as complete as usage guidance gets.

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