Skip to main content
Glama

ha_inject_luminance

Boost RGB luminance in Ha-emitting regions while preserving color balance. Use when narrowband Ha signal surpasses broadband luminance, multiplying channels by strength-scaled excess fraction.

Instructions

Raise the luminance of an RGB view in place where Ha exceeds it, keeping colour ratios. With Y the Rec.709 luminance, each channel is multiplied by (Y + strength * max(Ha - Y, 0)) / Y. Runs as 64-bit PixelMath truncated to [0,1].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ha_idYesHa view (mono, same dimensions)
strengthYesFraction of the Ha excess over the luminance that is added
target_idYesTarget RGB view, modified in place

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden, and it does well: it discloses in-place modification, the exact per-channel formula, 64-bit PixelMath execution, and truncation to [0,1]. It does not mention edge cases like no-op behavior when Ha never exceeds Y, but the core mutation behavior is transparent.

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 compact and front-loaded with the purpose, then gives the formula and execution detail. Every sentence carries meaningful information; there is no filler or redundancy.

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 three-parameter in-place transform with no output schema, the description is nearly complete: it defines the operation, the math, the precision, and the clipping behavior. A minor gap is that it does not state prerequisites like the target being an open RGB view or the result of the in-place operation, though these are partially implied by the schema.

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 three parameters clearly. The description adds the formula context around 'strength' and the Rec.709 luminance definition, but it does not substantially enrich parameter meaning 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 states a specific verb ('Raise the luminance'), a precise resource ('an RGB view'), and the exact condition ('where Ha exceeds it'). It distinguishes itself from sibling ha_inject_red by targeting luminance while preserving colour ratios, so an agent can tell them apart.

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?

The description explains the mechanism but gives no explicit guidance on when to use this tool versus alternatives like ha_inject_red, extract_pseudo_oiii, or create_synthetic_luminance. Usage context is only implied by the mathematical behavior, not stated.

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