Skip to main content
Glama
iftahs
by iftahs

stretch

stretch
Destructive

Apply non-linear scaling to astrophotography images via STF, arcsinh, masked, or manual methods, adjusting brightness, contrast, and black point to reveal faint structures while preserving star colors.

Instructions

Linear → non-linear. method: 'sts' (AutoSTF made permanent; target_background 0.25 default, shadows_clip -2.8), 'arcsinh' (colour-preserving, stretch factor), 'masked' (MaskedStretch, star-friendly), 'mas' (MultiscaleAdaptiveStretch), 'ht' (manual shadows/midtones/highlights), 'ghs' if installed. Checkpoints first. Check clipped-black % afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
hardNo
linkedNo
methodNo
paramsNoExtra raw PixInsight process parameters (exact PJSR names)
shadowsNo
stretchNoarcsinh factor
midtonesNo
checkpointNoWrite an .xisf checkpoint before running (default true)
highlightsNo
iterationsNo
black_pointNo
shadows_clipNo
aggressivenessNo
target_backgroundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

The description adds behavior beyond the destructiveHint annotation by stating that checkpoints are created before running and that clipped-black percentage should be checked afterward. It also discloses useful defaults and method characteristics such as 'colour-preserving', 'star-friendly', and 'if installed', which annotations alone would not provide.

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 dense and efficient, front-loading the purpose and then moving to method-specific details and workflow reminders. It contains no filler, though its telegraphic style and heavy abbreviations require domain familiarity.

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

Completeness2/5

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

With 15 parameters, destructive behavior, and no output schema, the description is too sparse to fully support correct invocation. The method-specific notes are helpful, but the lack of explanation for core parameters like id, hard, and linked leaves an agent uncertain about required setup.

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 only 20%, so the description carries added burden, and it does help by explaining the method enum and linking parameters such as stretch, shadows/midtones/highlights, target_background, and shadows_clip to specific methods. However, many parameters including id, hard, linked, iterations, black_point, and aggressiveness remain unexplained, leaving a significant semantic gap.

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?

The opening 'Linear → non-linear' states the core purpose clearly, and the list of stretch methods (sts, arcsinh, masked, mas, ht, ghs) reinforces that this is a stretch tool. It does not explicitly differentiate itself from sibling tools like curves or hdr_compress, so it misses the top score.

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?

'Linear → non-linear' provides a clear precondition for when to use this tool, and the hints 'Checkpoints first' and 'Check clipped-black % afterwards' give practical invocation and verification guidance. It does not name alternative tools or explicitly state when not to use it, so it stops short of full exclusion guidance.

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