Skip to main content
Glama

get_image_stats

Retrieve median, MAD, min, max, per-channel medians, and clamp fractions from a PixInsight image view to assess pixel distribution and clipping.

Instructions

Get image statistics: median, MAD, min, max, per-channel medians, and per channel the fraction of samples at exactly 0 and at exactly 1 (clampFractions).

Input Schema

NameRequiredDescriptionDefault
view_idYesPixInsight view ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses what is computed (median, MAD, min/max, per-channel medians, clampFractions), which is meaningful behavioral detail, but says nothing about cost, whether the view must be open, or side effects. Adequate but leaves gaps for a no-annotation tool.

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?

A single front-loaded sentence lists the verb, resource, and all returned statistics with zero padding. Every clause earns its place.

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 compensates by enumerating the exact returned values including the non-obvious clampFractions. It is close to complete for a read-only stats tool, missing only access/prerequisite context.

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?

Only one parameter (view_id) and schema description coverage is 100%, with the schema documenting it as a PixInsight view ID. The description adds no further parameter meaning, which matches the baseline when the schema does the work.

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 (get) and resource (image statistics) and enumerates the exact statistics returned. It is distinct from measurement siblings like measure_sharpness or measure_saturation, though it does not explicitly say how it differs from them.

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 prefer this tool over the many measure_* siblings (measure_core_clipping, measure_clipped_blocks, etc.), nor any prerequisites such as the view needing to be open. Usage is only implied by the tool name and stat list.

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