Skip to main content
Glama

create_luminance_mask

Generate a luminance mask from a color view for selective edits. Uses Rec.709 coefficients, optional blur, and shadow clip to isolate bright areas.

Instructions

Create a luminance mask from a color view: Y = 0.2126R + 0.7152G + 0.0722B, then an optional blur and shadow clip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blurNoBlur sigma applied to the mask (default 5)
gammaNoGamma curve applied to the mask (default 1.0)
mask_idYesName for the mask
clip_lowNoShadow clip threshold, below which the mask is 0 (default 0.10)
source_idYesSource color view ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It discloses the mathematical operation and optional processing steps (blur and shadow clip), which is useful. However, it doesn't mention that this creates a new mask view (mutation), potential side effects on existing masks, or whether the operation is reversible. Basic behavioral context is present but not comprehensive.

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?

One sentence that packs the core formula, optional processing, and the purpose. It is efficient and begins with the primary action. Could arguably be split for readability, but it's not verbose.

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

Completeness3/5

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

Given 5 parameters, no output schema, and no annotations, the description is reasonably complete for a creation tool. It explains the main calculation and optional post-processing, but lacks details on what happens to existing masks, potential required prerequisites (e.g., a color view must be open), and clear usage context. It's sufficient but not exhaustive.

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 parameters are already documented. The description adds formula details (Y = 0.2126R + 0.7152G + 0.0722B) and mentions blur and shadow clip, which map to blur and clip_low parameters. But it doesn't explain the gamma parameter or how the shadow clip threshold is applied beyond the schema's description. Baseline 3 is appropriate since schema covers most semantics.

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?

States a specific verb, resource (luminance mask), and the underlying math formula, plus optional blur and shadow clip. It distinguishes from create_zone_masks and create_adaptive_zone_masks by implying a luminance-based mask rather than zone masks, though it doesn't explicitly name the difference.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like create_adaptive_zone_masks or create_synthetic_luminance. The description implies a use case (creating a luminance mask from a color view) but doesn't state when it's preferred or when to avoid it.

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