Skip to main content
Glama

measure_star_layer

Measures a star layer image by counting pixels with signal, reporting fractions above set brightness levels, color saturation spread, and chroma of bright stars. Returns max, median, and per-level fractions.

Instructions

Measure a star layer (a mostly black view holding stars). Over every 4th pixel whose largest channel is above 0.005 (nonzero_pixel_count), reports the fraction whose largest channel is above each of the given levels, the interquartile range of their HSV saturation (color_diversity), and the median (max - min) / max of the 20 brightest by R+G+B (bright_star_chroma). Also the largest channel value (max) and the image median (the mean of the channel medians for colour). Returns JSON: max, median, fraction_above {level: fraction}, color_diversity, bright_star_chroma, nonzero_pixel_count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelsYesPixel levels; for each, the fraction of star pixels whose largest channel is above it is reported
view_idYesStar layer view to measure

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.1/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 behavioral burden and succeeds: it discloses the subsampling scheme ('every 4th pixel'), the selection threshold ('largest channel ... above 0.005'), the precise diversity and chroma formulas, and the exact JSON return fields. No contradiction with annotations since none exist.

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 purpose is front-loaded and nearly every clause earns its place given the tool's six outputs. However, the opening sentence is a long run-on with nested parentheticals; tighter sentence structure would merit a 5.

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

Completeness4/5

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

With no output schema, the description rightly specifies the full return JSON, the sampling behavior, and the metric definitions, so an agent can call the tool correctly from text alone. Minor gaps remain: expected value range for levels and prerequisites for producing a star layer are not stated.

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 baseline is 3. The description adds only modest param-level meaning: it ties levels to the fraction_above {level: fraction} output key structure, but otherwise largely restates what the schema already says about view_id and levels.

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?

States a specific verb ('Measure') and a defined resource ('a star layer (a mostly black view holding stars)') and enumerates the exact metrics computed: fraction above levels, color_diversity, bright_star_chroma, max, and median. The algorithmic specificity distinguishes it from the sibling measure_stars without ambiguity.

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

Usage Guidelines3/5

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

The star-layer definition implies the intended input context, but the description never states when to choose this tool over siblings like measure_stars, measure_sharpness, or measure_bright_chroma, and gives no exclusions or alternatives. Usage context is present only implicitly.

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