Skip to main content
Glama

run_mgc

Correct gradients in plate-solved linear PixInsight images using the MARS reference database via MultiscaleGradientCorrection; mono images require a filter.

Instructions

Run MultiscaleGradientCorrection using the MARS reference database. The image must be plate-solved and linear; a mono image also needs the flux metadata run_spfc writes. For a mono image pass filter (L, R, G, B, Ha, OIII, SII); a mono image without filter is refused, since MGC would then fit its model against a MARS band that is not the image's. For a color image leave it out (R, G, B bands are used). MARS files default to the ones configured in PixInsight.

Input Schema

NameRequiredDescriptionDefault
filterNoMono only. One of L, R, G, B, Ha, OIII, SII
view_idYesView ID to process
mars_filesNoAbsolute .xmars paths (default: from PixInsight settings)
show_modelNoAlso create the gradient model window
gradient_scaleNoGradient scale in pixels (default 1024)
model_smoothnessNoModel smoothness (default 1)
structure_separationNoStructure separation (default 3)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4.2/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 burden and does well: it discloses the refusal condition for a mono image without a filter, the prerequisite metadata, and the default source of MARS files. It stops short of saying the target view is modified in place or what the returned result is.

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?

Four tight sentences, front-loaded with the operation and its hard prerequisites before the conditional filter rules. The final sentence about MARS defaults lightly repeats the schema default but is not wasteful.

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 no-annotation, no-output-schema process tool with 7 parameters, the description covers prerequisites, conditional parameter behavior, and defaults adequately. The remaining gap is that it never states the target view is mutated in place.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains that filter applies to mono only, lists the allowed values, and justifies why omitting it on mono is fatal (band/model mismatch). That reasoning is not in the schema.

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?

Names a specific verb and resource ("Run MultiscaleGradientCorrection") and immediately scopes it with the MARS reference database. It does not, however, differentiate itself from the sibling gradient-correction tools (run_gradient_correction, run_abe, run_per_channel_abe), which an agent would need to disambiguate among.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit preconditions are given (must be plate-solved and linear; mono requires flux metadata written by run_spfc), plus a clear when-to-pass-filter rule for mono vs color and a stated refusal case with the reason behind it. This is close to a complete routing guide for the tool.

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