Skip to main content
Glama

measure_stars

Measures stars in a view by pixel sampling, returning median FWHM, color diversity, star count, and background contrast for assessing image quality.

Instructions

Measure the stars of a view by pixel sampling. Candidates are local maxima of luminance found by a 16 px grid scan above median + 5 x MAD, refined within 5x5, de-duplicated within 20 px (at most 100 kept); the 30 brightest are measured. FWHM of a star = 2 x the mean radius, over the four axis directions (up to 10 px), where luminance drops below half its peak, located to a fraction of a pixel by linear interpolation between the samples either side; colour diversity of a star = max - min of its peak RGB divided by the largest channel. Returns JSON: median_fwhm_px, color_diversity (median), stars_found, stars_measured, median_peak, p25_peak, background_median, star_background_contrast (median_peak / background_median, 0 when background_median <= 0.001), and up to 10 samples of each. luminance is 0.2126R + 0.7152G + 0.0722B.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
view_idYesView to measure

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the sampling method, thresholds, de-duplication, FWHM calculation, color diversity, and the exact return fields. It lacks explicit side-effect or error info but is highly transparent about its process and output.

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 description is long but each sentence adds necessary technical detail. The purpose is front-loaded, followed by a logical breakdown of the algorithm and return values. It is dense but not wasteful.

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 tool with no output schema, the description is exceptionally complete. It defines the algorithm, thresholds, return fields, and even the luminance formula, leaving no ambiguity for correct invocation.

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?

The schema already describes view_id as 'View to measure' with 100% coverage. The description does not add any extra semantics, format constraints, or usage hints for this parameter. Baseline 3 applies.

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 clearly states 'Measure the stars of a view by pixel sampling' with a specific verb and resource. It goes further to describe the exact algorithm, distinguishing it from sibling measurement tools like measure_star_layer or measure_ringing.

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?

There is no guidance on when to use this tool versus alternatives. It does not mention conditions, exclusions, or trade-offs. An agent would have to infer its use case from the technical details alone.

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