Skip to main content
Glama

create_zone_masks

Creates core, shell, and halo masks from luminance thresholds, each with linear ramps and Gaussian blur. Set three clip values to generate masks for targeted edits.

Instructions

Create core, shell and halo masks from three fixed luminance thresholds. Luminance is the Rec.709 luma of a color view, the samples of a gray one: core = above core_clip, shell = shell_clip to core_clip, halo = halo_clip to shell_clip, each ramped linearly from 0 to 1 across its band and Gaussian-blurred with sigma 8, 12 and 20. Creates views mask_core, mask_shell and mask_halo, replacing views of those names. Requires halo_clip < shell_clip < core_clip < 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
view_idYesSource view the masks are computed from
core_clipYesLuminance above which a pixel is in the core mask (0-1)
halo_clipYesLuminance above which a pixel, up to shell_clip, is in the halo mask (0-1)
shell_clipYesLuminance above which a pixel, up to core_clip, is in the shell mask (0-1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.5/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. It goes well beyond the schema by explaining how masks are computed, that they are linearly ramped and Gaussian-blurred with specific sigmas, and that views mask_core, mask_shell, and mask_halo are created and replaced. This is unusually transparent about side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but efficient: the first sentence states the core action, the second provides the algorithm details, and the final sentence states the required constraint. Every clause contributes useful information with no filler.

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 tool with no output schema and no annotations, the description is remarkably complete. It names the output views, describes the computation, discloses the replacement behavior, and mandates the threshold ordering. An agent has enough to invoke it 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%, so the baseline is 3. The description reinforces the parameter meanings by mapping each clip threshold to its band, but it does not add substantial new meaning beyond the schema's own parameter descriptions.

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 leads with a specific verb and resource: 'Create core, shell and halo masks from three fixed luminance thresholds.' It clearly distinguishes this tool from sibling tools like create_adaptive_zone_masks by emphasizing 'fixed' thresholds and naming the exact masks produced.

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

Usage Guidelines4/5

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

The description provides clear operational context: it defines the three threshold bands, the linear ramp, the Gaussian blur sigmas, and the required ordering halo_clip < shell_clip < core_clip < 1. It does not explicitly name alternatives or state when not to use it, but the 'fixed thresholds' phrasing implies the contrast with an adaptive sibling.

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