Skip to main content
Glama

measure_saturation

Measures HSV saturation of bright subject pixels in a colour view, returning median, p90, p99, and max values for analysis.

Instructions

Measure HSV saturation, (max - min) / max, of subject pixels of a colour view: every 8th pixel whose luminance is above the luminance of the channel medians + 5 x (median |luminance - that| on a 32 px grid). Returns JSON: median, p90, p99, max, subject_pixel_count. A mono view is an error. luminance is 0.2126R + 0.7152G + 0.0722B.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
view_idYesColour view to measure

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description must carry the behavioral burden. It does so by disclosing the exact sampling strategy, luminance formula, output JSON fields, and error condition for mono views. It does not explicitly state it is read-only, but 'Measure... Returns JSON' strongly implies no mutation.

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 two dense sentences with no filler. Every clause provides necessary technical detail: formula, sampling, output, error condition, and luminance coefficients.

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?

There is no output schema, so listing the exact JSON fields is essential and provided. The error condition, sampling rule, and formula fully equip an agent to invoke and interpret the result for a single-argument tool.

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 only parameter view_id already has a basic description. The tool description adds meaningful semantics: the view must be a colour viewcars and mono views are invalid, which goes beyond the schema.

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 and resource: 'Measure HSV saturation' of subject pixels in a colour view. It includes the exact formula and the return values, making it clearly distinct from sibling measurement tools like measure_bright_chroma or measure_uniformity.

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?

It clearly states this applies to colour views only and that a mono view is an error, which is a strong when-not signal. It does not explicitly name sibling alternatives, so guidance on when to prefer this over measure_bright_chroma or measure_subject_detail is absent, but the technical definition gives sufficient context.

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