Skip to main content
Glama
iftahs
by iftahs

calibrate_lights

calibrate_lights

Calibrates CFA light frames using master dark, flat, and optional bias with dark scaling. Requires a master flat unless force is enabled; outputs calibrated XISF files with per-frame progress.

Instructions

ImageCalibration of light frames (CFA-aware) with master dark/flat (+bias only for dark scaling). Refuses without a master flat unless config requireFlats=false or force:true. Outputs /work/calibrated/*_c.xisf. Async with per-frame progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoExplicit file list
forceNo
out_dirNo
group_idNoGroup id from scan_frames (alternative to files)
master_biasNo
master_darkNo
master_flatNo
calibrate_darkNoSubtract bias from the master dark before use (only with optimize_darks)
optimize_darksNoDark scaling (requires master_bias); default false
output_pedestalNoDN pedestal added to outputs (0 default)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The description adds meaningful behavior beyond the generic annotations: it discloses the CFA-aware nature, the requirement for a master flat, the output location pattern, and that execution is async with per-frame progress. This gives the agent useful operational expectations without contradicting the readOnlyHint/destructiveHint annotations.

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: the first sentence states the core operation, and subsequent sentences provide constraints, output, and async behavior. Every sentence adds operational value with no filler or repetition.

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

Completeness3/5

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

For a tool with 10 parameters and no output schema, the description covers the main workflow, output destination, and async behavior. However, it does not explain how out_dir interacts with the session path, how files and group_id selection are expected to work, or how outputs relate to previously calibrated files. These gaps make it adequate but not fully complete.

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?

The description compensates for the 50% schema coverage by clarifying the roles of master dark, master flat, master bias (only for dark scaling), and force. It also implies out_dir semantics via the output path. Some parameters like out_dir remain ambiguous, but the core master/force relationships are meaningfully explained 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 names a specific process ('ImageCalibration'), the exact resource ('light frames'), and key characteristics ('CFA-aware', uses master dark/flat). It is clearly distinguished from sibling tools like build_master_dark, debayer, or cosmetic_correction because it targets the calibration step for light frames.

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

Usage Guidelines3/5

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

The description implies when to use the tool by specifying that it calibrates light frames with master dark/flat, and it provides a failure condition ('Refuses without a master flat unless config requireFlats=false or force:true'). However, it does not explicitly mention alternatives or when not to use it, such as when only cosmetic correction or debayering is needed.

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