Skip to main content
Glama

ha_inject_red

Adds Hydrogen-alpha signal to the red channel of an RGB image where Ha exceeds red by a set fraction, boosting emission detail with optional soft clamp. Reports resulting red maximum and image statistics.

Instructions

Add Ha to the red channel of an RGB view in place, where Ha exceeds R by a given fraction. Where Ha > R * (1 + brightness_limit), R becomes R + strength * (Ha - R); elsewhere R, and G and B everywhere, are unchanged. With max_output and rolloff, R above max_output becomes max_output + (R - max_output) * rolloff. Runs as 64-bit PixelMath truncated to [0,1]; reports the new R maximum and the image median and max.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ha_idYesHa view (mono, same dimensions)
rolloffNoFraction of the excess above max_output that is kept; given together with max_output
strengthYesFraction of the Ha excess over R added to R
target_idYesTarget RGB view, modified in place
max_outputNoOptional: R level above which the soft clamp compresses; given together with rolloff. Omitted = no clamp
brightness_limitYesHa is added only where Ha > R * (1 + brightness_limit)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses that the operation modifies the target in place, runs as 64-bit PixelMath truncated to [0,1], and reports the new R maximum and image median/max. With no annotations provided, this is substantial behavioral disclosure. It could add side-effect warnings (e.g., irreversible modification) but the in-place mutation is already stated.

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?

Three sentences, each dense with information: the core transformation, the optional clamp, and the execution/reporting behavior. No filler or repetition of schema content.

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?

For a 6-parameter mutation tool with no output schema and no annotations, the description covers the transformation, the optional clamp, the in-place behavior, and the reported outputs. It does not explicitly state prerequisites (e.g., matching dimensions, mono Ha view) but the schema already notes 'same dimensions' for ha_id. The main gap is lack of explicit warning about irreversibility, but the in-place statement covers the critical part.

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 schema already documents all six parameters. The description adds the formula context that ties the parameters together (e.g., how strength and brightness_limit interact), but it does not add per-parameter details beyond the schema. Baseline 3 is appropriate.

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 states a specific verb ('Add Ha to the red channel'), the resource (RGB view), the condition (where Ha exceeds R by a given fraction), and the exact transformation formula. It clearly distinguishes itself from the sibling ha_inject_luminance by targeting the red channel rather than luminance.

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 explains the mathematical condition and the optional clamp behavior, giving an agent enough context to decide when to use it. It does not explicitly name alternatives or state when not to use it, but the precise formula and the sibling name ha_inject_luminance make the intended use case clear.

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