Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PIXINSIGHT_BINNoOverride for the PixInsight executable path.
PIXINSIGHT_DIRNoOverride for the PixInsight install root directory.
PIXINSIGHT_CONNECTOR_PACKSNoList of ES modules that add or replace tools at startup.
PIXINSIGHT_CONNECTOR_WORKSPACENoTarget folder the tools work in. Defaults to the folder the harness started in if not set and no workspace is named via set_workspace.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
align_filesA

Register image files onto a reference image file with StarAlignment, file to file (no views are opened). Targets run in batches of at most batch_size (20 at most), one StarAlignment execution per batch. Registered files (<output_postfix>.xisf) go to output_dir, which must lie inside /output (a relative path is resolved there) or the state folder. matrix_only: StarAlignment in OutputMatrix mode, reporting the registration per target without keeping any image file; its output directory is a temporary folder under /agentic/scratch/align_files that is deleted afterwards, and any file written there is listed. Per target the result gives the outputData values StarAlignment reports (output file, star pair matches, errors, transformation elements, as this PixInsight names them). Runs without geometry confirmation dialogs.

verify_astrometryA

Measure how well an open image's astrometric solution reproduces the sky, with the engine of PixInsight's AstrometricSolutionVerifier script (PixInsight 1.9.5 or later), run without its dialog: no deviation map, graphs, files or new windows, and the image is not modified. Every detected star is PSF-fitted, placed on the sky with the image's solution and compared with its Gaia DR3 star at the observation time. The result (JSON) gives the star counts (detected, PSF-fitted, matched, rejected by sigma clipping), the catalogue and its limit magnitude, the deviations (median, sigma, rms, 90th and 99th percentile, maximum) in pixels and arcseconds over the stars kept after sigma clipping and over all matched stars, the median bias, and the grid cell with the largest median deviation (cells with fewer than 3 matched stars are skipped) with its column, row and centre in image pixels. The view needs an astrometric solution.

run_plate_solveA

Plate solve an open image with ImageSolver against the local Gaia DR3/SP database (offline). Adds the astrometric solution needed by run_spfc, run_mgc and run_spcc. Needs an approximate position (ra_deg, dec_deg; within a fraction of the field is enough) and scale (pixel_scale in arcsec/px, or focal_length_mm + pixel_size_um) unless the image keywords already carry RA, DEC and FOCALLEN/XPIXSZ. If the seeded solve fails, it is retried with the scale seed multiplied by 0.5, 2, 1/3 and 3 in turn (scale_search false tries the seed only). The result gives the solved scale from the solution, the expected scale (the seed, or the one the keywords give) and their ratio, which is far from 1 for a master a stacker resampled or drizzled. Observation time is read from DATE-OBS/DATE, else today. The result also states whether distortion correction and recursive surface splines were on.

copy_astrometric_solutionA

Copy the astrometric solution (WCS) and observation keywords from a source image file to a target view. Source and target must have the same dimensions; the target's pixels are unchanged.

catalog_starsA

List catalogue stars over a plate-solved view from PixInsight's local Gaia database: one Gaia search centred on the image, with a radius reaching its corners (plus margin_fraction), down to mag_limit. Per star: image x, y, RA, Dec, G, BP-RP where the catalogue has them, whether it falls inside the frame, and for in-frame stars the peak luminance in a 5x5 box (with saturated = peak >= saturation_level when that is given). data_release omitted: releases are asked get-info in the order DR3/SP, DR3, EDR3, DR2 and the earliest of them that reports valid is searched; a failed search is reported, not retried on another release. supplement adds stars the catalogue lacks (marked with their name); a Gaia star within merge_px of one is replaced by it. Sorted by G, brightest at the top. The full list is written to a JSON file under /agentic/scratch/catalog; the reply carries it inline up to 200 stars.

combine_channelsA

Combine 3 mono views into a single RGB color image using ChannelCombination. All 3 views must have identical dimensions. Returns the view ID of the combined image.

align_to_referenceA

Align a target image to a reference image using StarAlignment. The target is replaced in place with the aligned version.

run_per_channel_abeA

Run AutomaticBackgroundExtractor (ABE) separately on the R, G and B channels of a color view, then recombine them into the view with ChannelCombination. ChannelExtraction writes the channels to the temporary views __pca_R, __pca_G and __pca_B; ABE subtracts its model from each in place and discards the model; the temporary views and any other view the call opened are closed afterwards. An ABE parameter that is not given is left at PixInsight's default, as run_abe does.

lrgb_combineA

Replace the lightness of an RGB view with a grayscale L view using LRGBCombination, in place on the RGB view. Only the L channel is enabled, so the RGB view keeps its own color channels. lightness and saturation are LRGBCombination's transfer-function midtones balances mL and mc (0.5 leaves that component unchanged). When linear_fit_reject_high is given, the call also runs LinearFit on the L view (modified in place, ahead of the combination) against a temporary luminance image 0.2126 R + 0.7152 G + 0.0722 B of the RGB view; when it is omitted, no LinearFit runs. Chrominance noise reduction and highlight clipping are left at PixInsight's defaults.

compare_imagesA

Compare two open views of the same width, height and channel count, pixel by pixel, over the whole image or a rectangle. Per channel: maximum, mean and 99th-percentile absolute difference, and the fraction of samples outside [0, 1] in each view. "identical" is true when every absolute difference is 0. The 99th percentile is taken over at most 2,000,000 evenly spaced samples (p99Samples says how many); maximum and mean use every sample. Neither view is changed.

multi_scale_enhanceA

Masked three-scale LocalHistogramEqualization on a view, in one call, with an optional HDRMultiscaleTransform pass. The mask is the image lightness (CIE L* for colour, the image itself for mono) mapped as max((L - mask_clip_low) / (1 - mask_clip_low), 0), raised to the power 1/mask_gamma and blurred with a Gaussian of sigma mask_blur (0 = no blur). LHE then runs at the large, mid and fine radius in that order through the mask; the large and mid scales use lhe_slope_limit, the fine scale lhe_fine_slope_limit; other LHE parameters are PixInsight's defaults. Giving hdrmt_layers adds an HDRMultiscaleTransform pass through the same mask. The mask is closed afterwards. Reports a detail score before and after: the mean squared Sobel gradient of luminance (Rec.709 weights) over pixels brighter than median + 8 x 1.4826 x MAD, sampled every 8 pixels.

shell_detail_enhanceA

Protected high-pass detail enhancement at two scales, in place. For each scale, detail = image - Gaussian blur of sigma _sigma (locally zero-mean), and result = image + _amount x detail x protection, where protection = exp(-protect_softness x max(0, L - protect_knee) / max(1 - protect_knee, 0.01)) and L is Rec.709 luminance, so the boost attenuates above protect_knee. A scale with amount 0 is skipped. Output is truncated to [0, 1]. It does not hold the peak fixed: the added detail can raise the image maximum (the result reports the image maximum before and after, from full image statistics). With mask_id the enhancement runs through that mask; with auto_zone and no mask_id it builds the adaptive shell zone mask (as create_adaptive_zone_masks with its default core_bias), uses it and closes it, and fails without changing the view if that mask cannot be built; with neither it runs unmasked. Reports before/after texture metrics over pixels between median + 5 x 1.4826 x MAD and 0.98, sampled every 8 pixels: mean squared Sobel gradient, median local standard deviation of 16-pixel blocks that are at least 30% such pixels, and the share of them where protection is below 0.5.

inspect_environmentA

Report what this PixInsight installation has, by asking PixInsight. gaia: Gaia get-info for DR2, EDR3, DR3 and DR3/SP (valid, database files, magnitude range, mean spectra) and a 0.1-degree search on the lowest valid release. mars: one MultiscaleGradientCorrection run per MARS file (from PixInsight settings, or mars_files) on a temporary synthetic plate-solved image; per file: readable, missing or corrupt, and how many MARS reference images cover the probe position. xterminators: BlurXTerminator, NoiseXTerminator and StarXTerminator run once each on a temporary 64x64 image; reports version, ML model version and gpu/cpu from their console banner (null when not printed). processes: the PixInsight core version and build, whether MultiscaleAdaptiveStretch, MultiscaleGradientCorrection, BlurXTerminator, NoiseXTerminator and StarXTerminator are installed processes, and whether ImageSolver, AstrometricSolutionVerifier, DistortionEvaluator, FFTRegistration and MosaicByCoordinates are installed scripts, with the version each script declares; nothing is run. system: free and total memory, free space on the workspace volume. Temporary images are closed; open images are not touched. Without ra_deg/dec_deg the probe position is RA 0, Dec 0 and coverage is reported as null.

run_pjsrA

Run a PJSR (JavaScript, V8 engine) snippet inside PixInsight and return its console output. Last resort for things the other tools do not cover. Call processEvents() before each long process (BXT, NXT, SXT) so Pause/Abort works. No ES6 module syntax; the snippet is eval-ed as a script, so #include does not work and a top-level return is a syntax error; include prepends files instead. Code that does not parse is refused with its line number before anything reaches PixInsight.

run_pixelmathA

Run an arbitrary PixelMath expression in place on a view. The result is truncated to [0,1]; the reply gives, per channel, the fraction of samples that were below 0 or above 1 before truncation, and their min and max. RULES: (1) NO pow() — use exp(exponent*ln(base)). (2) Channel access is $T[0] for R, $T[1] for G, $T[2] for B — NOT $T.R or $T.B. (3) For other images use viewId[0], viewId[1], viewId[2].

pixelmath_new_imageA

Run PixelMath to create a NEW image from expressions that reference other open views by id. Color "rgb" takes red/green/blue expressions; color "gray" takes a single expression. The new image is truncated to [0,1]; the reply gives, per channel, the fraction of samples that were below 0 or above 1 before truncation. When size_from has an astrometric solution it is copied onto the new image (same geometry), unless copy_astrometric_solution is false. View ids used inside expressions must be simple identifiers (rename_view renames a view). No pow() — use exp(exponent*ln(base)) or the ^ operator.

run_processA

Instantiate any PixInsight process by its PJSR constructor name, assign JSON-valued parameters onto the instance, and execute it on a view (when view_id is given) or globally (when it is omitted). Generic fallback for processes with no dedicated tool. A params key that is not a parameter of the installed process is refused by name, since PixInsight would otherwise ignore it. A process that has the noGUIMessages property (Crop, DynamicCrop, Resample, IntegerResample, Rotation, FastRotation, ChannelMatch and others) runs with it set to true unless params sets it, so its confirmations and warnings go to the Process Console instead of a dialog.

run_pjsr_fileA

Run a PJSR (JavaScript, V8 engine) source file from disk inside PixInsight and return its console output. Same execution model as run_pjsr, with the code read from a file instead of passed inline. No ES6 module syntax; the file content is eval-ed, so #include does not work. Code that does not parse is refused with its line number before anything reaches PixInsight.

ensure_dirA

Create a folder, with any missing parents, inside the workspace's output folder or state folder. A relative path is resolved under /output; an absolute one must lie inside /output or the state folder (/agentic by default), and a path anywhere else is refused. An existing folder is left as it is. Returns the absolute path.

open_imageA

Open an XISF/FITS image file in PixInsight. Returns the view ID assigned by PixInsight. Automatically closes any crop_mask windows that come with XISF files.

close_imageA

Close an image window to free memory.

list_open_imagesA

List all currently open images in PixInsight with their dimensions and color status.

rename_viewA

Rename an image view to a different view ID. Long XISF names can cause some PixInsight processes to fail.

clone_imageA

Clone an image to a backup view, which can be restored from later with restore_from_clone. The clone keeps the image's FITS keywords, astrometric solution and view properties.

restore_from_cloneA

Restore an image from a backup clone, replacing all changes since the clone was made.

crop_imageA

Crop pixels off the edges of an image, in place. Amounts are pixels to remove from each side. All four amounts 0 (or omitted) runs nothing and leaves the image, and its astrometric solution, unchanged. Crop runs with noGUIMessages, so PixInsight writes its warnings to the Process Console instead of opening a confirmation dialog. A crop deletes the image's astrometric solution (PixInsight behaviour); the result says when one was removed.

get_image_dimensionsA

Get dimensions, channel count, and color status for one or more views. Every channel must have identical dimensions before ChannelCombination.

get_image_statsB

Get image statistics: median, MAD, min, max, per-channel medians, and per channel the fraction of samples at exactly 0 and at exactly 1 (clampFractions).

export_imageA

Write an image to a file in the workspace's output or state folder. A relative file_path is resolved under /output; an absolute one must lie inside /output or the state folder (/agentic by default), and a path anywhere else is refused. Format comes from the extension: .tif/.tiff, .png, .jpg/.jpeg, .xisf, .fits. TIFF and PNG default to 16-bit, JPEG to 8-bit; use 32 for float. The file keeps the image's FITS keywords, astrometric solution and view properties (formats that cannot store them drop them). The working image is not changed. Missing parent folders are created.

list_processesA

List every PixInsight process available on this installation, by its PJSR constructor name (e.g. "SCNR", "PixelMath"). Read-only; classifies by prototype chain and never instantiates a process to build the list.

describe_processA

Describe one PixInsight process by its PJSR constructor name: whether it can run on a view and/or globally, its current parameter values and their types, and any named numeric constants it exposes for those parameters.

create_luminance_maskB

Create a luminance mask from a color view: Y = 0.2126R + 0.7152G + 0.0722B, then an optional blur and shadow clip.

apply_maskA

Apply a mask to a target view. The mask protects areas where it is black (0) and allows processing where it is white (1). Use inverted=true to flip this.

remove_maskB

Remove the current mask from a view.

close_maskA

Close and delete a mask window to free memory.

create_zone_masksA

Create core, shell and halo masks from three fixed luminance thresholds. Luminance is the Rec.709 luma of a color view, the samples of a gray one: core = above core_clip, shell = shell_clip to core_clip, halo = halo_clip to shell_clip, each ramped linearly from 0 to 1 across its band and Gaussian-blurred with sigma 8, 12 and 20. Creates views mask_core, mask_shell and mask_halo, replacing views of those names. Requires halo_clip < shell_clip < core_clip < 1.

create_adaptive_zone_masksA

Create three masks from percentiles of the image's own luminance. Subject pixels are those brighter than the background median + 5 MAD, sampled inside a circle of radius 0.35 * min(width, height) around their brightness-weighted centroid. Core = above the subject percentile 85 + 10 * core_bias; shell = a triangular ramp between the 25th percentile and the core level, peaking at their midpoint; outer = subject level up to the 25th percentile. Each is feathered over 20 px outside the circle and Gaussian-blurred with sigma 5, 10 and 20. Creates views azone_core, azone_shell and azone_outer, replacing views of those names; fewer than 50 sampled subject pixels is an error.

measure_uniformityA

Measure background uniformity via 4-corner median stddev. Lower score means more uniform.

measure_starsA

Measure the stars of a view by pixel sampling. Candidates are local maxima of luminance found by a 16 px grid scan above median + 5 x MAD, refined within 5x5, de-duplicated within 20 px (at most 100 kept); the 30 brightest are measured. FWHM of a star = 2 x the mean radius, over the four axis directions (up to 10 px), where luminance drops below half its peak, located to a fraction of a pixel by linear interpolation between the samples either side; colour diversity of a star = max - min of its peak RGB divided by the largest channel. Returns JSON: median_fwhm_px, color_diversity (median), stars_found, stars_measured, median_peak, p25_peak, background_median, star_background_contrast (median_peak / background_median, 0 when background_median <= 0.001), and up to 10 samples of each. luminance is 0.2126R + 0.7152G + 0.0722B.

measure_star_layerA

Measure a star layer (a mostly black view holding stars). Over every 4th pixel whose largest channel is above 0.005 (nonzero_pixel_count), reports the fraction whose largest channel is above each of the given levels, the interquartile range of their HSV saturation (color_diversity), and the median (max - min) / max of the 20 brightest by R+G+B (bright_star_chroma). Also the largest channel value (max) and the image median (the mean of the channel medians for colour). Returns JSON: max, median, fraction_above {level: fraction}, color_diversity, bright_star_chroma, nonzero_pixel_count.

measure_ringingA

Measure concentric oscillation around the brightest region. The centre is the middle of the brightest 64 px block (mean luminance); the radial luminance profile is averaged over 36 angles for radii 1..150 px (held inside the image). Along the profile, derivatives within ±0.001 carry no sign; at each sign change the summed |derivative| of the run it ends is its amplitude, and it is counted when that amplitude is above min_amplitude. Returns JSON: oscillations, max_amplitude (of the counted ones), center [x, y], profile_sample (the profile at radii 1..30). luminance is 0.2126R + 0.7152G + 0.0722B.

measure_sharpnessA

Measure sharpness as the mean Sobel gradient energy (gx² + gy²) of luminance over every 4th pixel of a region. The region is roi_x/roi_y/roi_w/roi_h when all four are given (it must lie inside the image), else the central half of the image in each dimension. Returns JSON: sharpness, samples, roi {x, y, w, h}. luminance is 0.2126R + 0.7152G + 0.0722B.

measure_core_clippingA

Measure how much of the brightest region is above a level. Around the brightest 64 px block (mean luminance), counts pixels with any channel above level in a 128 px box (every 2nd pixel) and a 32 px box (every pixel), both centred on that block and held inside the image. Returns JSON: fraction_above_wide, fraction_above_inner, peak (largest luminance in the wide box), core_center [x, y], wide_box, inner_box. luminance is 0.2126R + 0.7152G + 0.0722B.

measure_clipped_blocksA

Count image blocks with pixels above a level. Tiles the image in block_size px blocks and samples every 3rd pixel; a sample counts when its luminance or any channel is above level, and a block counts when more than block_fraction of its samples do. Returns JSON: blocks_over, total_blocks, locations (up to 10 counted blocks in descending fraction order: x, y, fraction). luminance is 0.2126R + 0.7152G + 0.0722B.

measure_highlight_textureA

Measure the texture of the bright subject zone. Subject pixels have luminance above median + 5 x (median |luminance - median| on a 32 px grid). The ROI is a circle around the luminance-weighted centroid of compact subject pixels (8 px grid, at least 2 of 4 neighbours 3 px away also subject), radius = their 90th-percentile distance held to [50 px, 0.45 x min(width, height)]. The shell zone is the P20..P92 band of the subject pixels in the ROI (every 4th pixel). local_stddev = median luminance stddev of 16 px blocks in the ROI whose samples are at least 40% shell; tonal_span = P90 - P10 of the shell pixels; gradient_energy = mean Sobel energy on shell pixels. With reference_id, the reference is measured over the same ROI and retention is current / reference for each value (null where the reference value is at most 0.0001, or 0.001 for tonal_span). Returns JSON: current, reference, retention, shell_zone, roi, shell_pixel_count, block_count. Fewer than 100 subject pixels in the ROI of either view is an error. luminance is 0.2126R + 0.7152G + 0.0722B.

measure_saturationA

Measure HSV saturation, (max - min) / max, of subject pixels of a colour view: every 8th pixel whose luminance is above the luminance of the channel medians + 5 x (median |luminance - that| on a 32 px grid). Returns JSON: median, p90, p99, max, subject_pixel_count. A mono view is an error. luminance is 0.2126R + 0.7152G + 0.0722B.

measure_tonal_presenceA

Measure subject and background tones. Every 8th pixel is subject when its luminance is above the background (luminance of the channel medians) + 5 x (median |luminance - background| on a 32 px grid) and at least 2 of its 4 neighbours 3 px away are too; every other sample is background. separation = subject median / background median; core_brightness = mean of the brightest 5% of subject samples; core_to_disk = core_brightness / subject median; faint_structure_visibility = (subject P10 - background P90) / background P90; subject_fraction = subject samples / all samples; roi_mode is compound_roi when a second luminance-weighted cluster, outside 0.15 x width of the centroid and holding over 15% of the weight, lies more than 0.25 x width away, else single. Denominators are held to at least 0.001. Returns JSON: separation, subject_median, background_median, core_brightness, faint_structure_visibility, core_to_disk, subject_fraction, roi_mode, subject_pixel_count. luminance is 0.2126R + 0.7152G + 0.0722B.

measure_bright_chromaA

Measure chroma, (max - min) / max, of the bright pixels of a colour view: every 8th pixel whose mean of R, G and B is above brightness_threshold. Returns JSON: median_chroma, mean_chroma, p25_chroma, p75_chroma, bright_pixel_count. A mono view is an error.

measure_subject_detailA

Measure subject brightness, detail and contrast. The image is split into 32 px blocks; a block is subject when its luminance median is above median + 8 x 1.4826 x MAD. subject_brightness = median of subject block medians; background_median = median of the other block medians; contrast_ratio = subject_brightness / background_median (0 when that is at most 0.001); detail_score = mean Sobel energy of luminance over every 4th pixel of up to 50 subject blocks; subject_count = subject blocks; subject_threshold = median + 3 x 1.4826 x MAD. Returns JSON: subject_brightness, detail_score, contrast_ratio, subject_count, background_median, subject_threshold. luminance is 0.2126R + 0.7152G + 0.0722B.

ha_inject_redA

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.

ha_inject_luminanceA

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].

extract_pseudo_oiiiA

Create a mono view from the B channel of an RGB view minus its scaled R channel. OIII = max(0, B - continuum_factor * R); any view of that name is replaced. Reports the new view's median and max.

continuum_subtract_haA

Subtract the scaled R channel of an RGB view from an Ha view, in place. Ha = max(0, Ha - continuum_factor * R). Runs as 64-bit PixelMath truncated to [0,1]; reports the new median and max.

dynamic_narrowband_blendA

Add Ha and OIII (mono views) to an RGB view in place, through a temporary luminance mask. R += ha_strength * Ha; B += oiii_strength * OIII; G += f * ha_strength * g_ha_fraction * Ha + (1 - f) * g_strength * OIII, with f = (OIIIHa)^(1-OIIIHa). Each channel above max_output becomes max_output + (x - max_output) * rolloff. The mask is the Rec.709 luminance of the target, Gaussian-blurred with sigma mask_blur, then 0 below mask_clip and (x - mask_clip) / (1 - mask_clip) above it; it is removed afterwards. Runs as 64-bit PixelMath truncated to [0,1]; reports the median and the R and B maxima.

create_synthetic_luminanceA

Create a mono view from a weighted sum of Ha and OIII. It is ha_weight * Ha + oiii_weight * OIII, replacing any view of that name; with max_value the result is min(…, max_value); it is then truncated to [0,1]. Reports the new view's median and max.

save_previewA

Save a JPEG preview of a view and return the file path. Optionally a crop region, a downsample factor, and an STF (display stretch) baked into the pixels: the STF of a view (stf_from) or a linked one given as stf_m and stf_c0. Without an STF the JPEG holds the view's pixel values as they are. The view itself is not changed.

save_and_show_previewC

Alias for save_preview. Save a JPEG preview of a view and return the file path.

run_scnrB

Run SCNR (Subtractive Chromatic Noise Reduction) to remove a green colour cast from a view.

run_gradient_correctionB

Run GradientCorrection on a view to remove a background gradient.

run_background_neutralizationB

Run BackgroundNeutralization to equalize the background level across channels.

run_nxtC

Run NoiseXTerminator to reduce noise on a view.

linear_fitB

Run LinearFit to scale a linear image to match a reference view. The reference is not modified.

run_lheA

Run LocalHistogramEqualization (contrast-limited local histogram equalization) on a view. Omitted parameters keep PixInsight's defaults.

run_bxtB

Run BlurXTerminator on a view. correct_only applies PSF correction without sharpening; otherwise sharpen_nonstellar and sharpen_stellar (the process's sharpen_stars parameter) control sharpening strength. ml_version is the process's neural network model version; omitted, the process keeps its own setting.

run_sxtA

Run StarXTerminator to separate stars from a view, replacing it in place with the starless result and producing a separate stars view. is_linear selects the unscreen mode: off for linear (pre-stretch) data, on for non-linear (stretched) data.

run_abeB

Run AutomaticBackgroundExtractor (ABE) on a view, replacing it in place with the corrected result.

run_hdrmtA

Run HDRMultiscaleTransform on a view. Inverted mode enhances detail; normal mode compresses dynamic range.

run_curvesA

Apply a CurvesTransformation to a view. Provide control points as [[x,y], ...] for the desired channel: "RGB" (all), "L" (lightness), "S" (saturation), "R", "G", "B".

find_filtersA

Search PixInsight's built-in filter and camera QE database by name (case-insensitive substring). A grouped name also matches each name it stands for ("Sony IMX411/455/461/533/571" matches "IMX533"); results are ordered exact name, then substring, then grouped-name matches. Use it to pick exact names for run_spfc or run_spcc. Sensor QE curves have channel Q.

run_spfcA

Run SpectrophotometricFluxCalibration: writes the flux metadata that run_mgc requires. The image must be plate-solved and linear. Needs the camera QE curve (default "Ideal QE curve"; pass qe_name for the real sensor, see find_filters) and the filter curve. MONO image: pass filter (L, R, G, B, Ha, OIII, SII) and optionally filter_name (a measured curve from the database; otherwise a flat passband from wavelength_nm/bandwidth_nm is used). COLOR image: omit filter and pass red_filter_name, green_filter_name, blue_filter_name (otherwise flat R/G/B passbands).

run_spccA

Run SpectrophotometricColorCalibration (SPCC). Requires the image to have an astrometric solution (run_plate_solve adds one) and to be linear (not stretched). Narrowband mode (narrowband_mode true) calibrates each channel as a narrow band: give the real filter centre and width per channel (red_/green_/blue_wavelength_nm and _bandwidth_nm; PixInsight's defaults are 656.3 / 500.7 / 500.7 nm and 3 nm for every band, wrong for a 5 nm H-alpha filter). The white reference matters for star colour: use a solar-type reference such as "G2V Star"; the default "Average Spiral Galaxy" makes a galaxy neutral and tints stars.

run_mgcA

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.

reproject_to_referenceA

Resample a plate-solved image onto the pixel grid of another plate-solved image, using the two astrometric solutions (PixInsight's astrometric reprojection): the result has the reference's size and solution and comes from a single interpolation of the source. Use it to bring a master from another telescope or session onto a reference grid; both views need a solution (run_plate_solve). The source is not changed; the result is a new 32-bit float view (output_id, default <view_id>_reprojected). It reports the size, the time and whether the result is empty (the two fields do not overlap). Registration accuracy is set by the two solutions, so check the star-centroid residual of the result against the reference.

resample_imageA

Change an image's pixel dimensions. mode "integer": IntegerResample by a whole factor (factor 2 bins 2x2 into one pixel with the given downsampling combination; enlarge: true multiplies the size instead). mode "scale": Resample by a relative factor (0.5 halves each side). mode "to_reference": Resample to exactly the width and height of reference_id. Runs in place, or on a copy named output_id that carries the keywords, astrometric solution and view properties. FITS keywords are kept. PixInsight removes the astrometric solution in these processes; the result states whether a solution was present before and after. Runs without the geometry confirmation dialog (noGUIMessages).

pixinsight_infoA

Report the resolved PixInsight installation paths for this platform and the connector version. Read-only. For live process status, use the doctor command.

star_protected_blendA

Blend a stars-only image into a starless one in place, as a screen blend that turns colour-preserving in bright star cores. The mode follows, per pixel, the star layer's own luminance SL (the mean of its three channels). Below core_threshold_low: per-channel screen blend 1 - (1 - target) * (1 - stars * k). Above core_threshold_high: luminance-only screen blend, the target's colour scaled by the new over the old luminance and capped at max_value. Between them the two blend linearly. k = strength * prot, where prot falls linearly from 1 at core_threshold_low to min_strength_fraction at core_threshold_high. With pre_star_id, the bright-area colour ratios of that view are then restored over the same luminance ramp (see restore_star_color). Runs as 64-bit PixelMath truncated to [0,1]; reports the target's median and max before and after.

restore_star_colorA

Restore the colour ratios of a reference view in the bright areas of a target, in place, keeping the target's luminance. Per channel: restored = min(reference[c] * Lt / max(Lr, 0.001), max_value), where Lt and Lr are the target's and the reference's channel means; it is weighted in linearly from 0 at reference luminance restore_start to 1 at restore_end. Runs as 64-bit PixelMath truncated to [0,1]; reports the target's median and max before and after.

robust_median_stretchA

Stretch a linear view in place so its median lands on target_median. Per pass: from the median M and the unnormalized median absolute deviation D of the image (range clipping off, alpha excluded), sigma = 1.4826·D and the black point c0 = max(0, M − black_point_sigma·sigma); samples are rescaled to u = clamp((x − c0)/(1 − c0), 0, 1), and the midtones transfer function MTF(m, u) = (m − 1)·u / ((2m − 1)·u − m) is applied with the balance m solved so that MTF(m, u(M)) = target_median exactly. linked true takes one set of statistics over all channels jointly; false takes them per channel. Each further pass repeats this on the previous output, re-measuring the statistics; passes before the last run on a scratch copy, so the view is written once and is left unmodified when any pass cannot be solved (a median on the black point, e.g. D = 0). With highlight_knee h and highlight_midtones mh, values y above h become h + (1 − h)·MTF(mh, (y − h)/(1 − h)) after the last pass. The result is JSON: per pass and per statistics group M, D, sigma, c0, the rescaled median xbar and m.

stretch_starsA

Stretch a linear star image in place with a pedestal subtraction and a repeated midtones transfer function. When the image median is above 1e-5 it is subtracted as a pedestal and the rest rescaled, max(0, (x − median)/(1 − median)); then the midtones transfer function MTF(m, x) = (1 − m)·x / ((1 − 2m)·x + m) is applied iterations times with m = midtone. Results are truncated to [0,1]. The result reports the pedestal, the final median and maximum, and high_fraction: among pixels sampled every 16 pixels whose value (the channel maximum) exceeds 0.005 before the stretch, the fraction above 0.5.

auto_stretchA

Stretch a view in place with PixInsight's auto-stretch (the ScreenTransferFunction Auto Stretch computation), applied as a HistogramTransformation. Per channel, sigma = 1.4826 × MAD (the median absolute deviation from the median). A channel whose median is below 0.5 gets shadows clipping c0 = median + shadows_clipping × sigma, clamped to [0,1] (0 when sigma is 0), and midtones balance m = MTF(target_bg, median − c0), where MTF(m, x) = (m − 1)·x / ((2m − 1)·x − m); a channel whose median is above 0.5 is treated as inverted: highlights clipping c1 = median − shadows_clipping × sigma (1 when sigma is 0) and m = MTF(c1 − median, target_bg). linked: one transform for R, G and B, with c0 (or c1) the mean over channels of the per-channel clipping points (a channel with sigma 0 adds 0, or 1 for c1) and the mean median in place of the median; the image is treated as inverted only when every channel median is above 0.5. The defaults of shadows_clipping, target_bg and linked are PixInsight's auto-stretch defaults. Fails, changing nothing, when the clipping point leaves no range for a midtones balance.

set_stfA

Set the ScreenTransferFunction (display stretch) of a view without changing its pixels, and return it as rows [m, c0, c1, r0, r1] for R, G, B (K for mono) and luminance. Either copy the STF of from_view_id, or compute PixInsight's auto-stretch exactly as auto_stretch does (per channel sigma = 1.4826 × MAD; c0 = median + shadows_clipping × sigma; m = MTF(target_bg, median − c0); linked: one set of values for R, G and B from the mean clipping point and mean median). An STF is stored with the view and saved in XISF files.

continuous_clampA

Compress bright values in place above a knee that varies per pixel. A luminance image (Rec.709 weights for colour) is blurred with a Gaussian of sigma blur_sigma and divided by its maximum, giving L in [0,1]; the knee is min_clamp + (max_clamp − min_clamp)·(1 − L), so it equals min_clamp where L = 1 and max_clamp where L = 0. mode soft: a value above the knee becomes knee + headroom·(1 − exp(−rate·(value − knee)/headroom)); mode hard: min(value, knee). The same expression is applied to every channel and the result is truncated to [0,1].

run_wbppA

Start WeightedBatchPreprocessing (WBPP) headless in a separate PixInsight instance (PixInsight -n --automation-mode --force-exit) over input_dirs, writing into output_dir, and return a run id at once; wbpp_status reports the run. output_dir must lie inside /output (a relative path is resolved there) or the state folder. Only the WBPP parameters given are passed; WBPP's own settings apply to the rest. Interactive local normalization and frame selection are turned off so nothing waits for a click. optimize_darks and drizzle_scale are applied to every light group by a generated pipeline-builder script. extra_params passes further WBPP automation parameters by name (BPP-Automation.js lists them). Refuses while the GUI instance runs a command for this workspace, and while an earlier run_wbpp run of this workspace is running. Tools that use the GUI instance keep working while WBPP runs.

wbpp_statusA

Report a run_wbpp run: running, finished (with the PixInsight exit code) or ended without an exit record; the master files in <output_dir>/master; the number of .xisf files in each subfolder of <output_dir>/registered and <output_dir>/calibrated; the WBPP log files in <output_dir>/logs; and the last lines of the instance's console output. run_id omitted: the latest run.

scan_workspaceA

Scan the working folder (recursively, any subfolder name) for XISF/FITS files and report each one's FILTER header value, geometry, exposure, whether it has an astrometric solution (WCS keywords CTYPE/CRVAL with a CD, CDELT or PC matrix, or PixInsight's PCL:AstrometricSolution properties), and its INSTRUME, TELESCOP, FOCALLEN, XPIXSZ, YPIXSZ and XBINNING keywords verbatim (null when absent). The connector's own state and output folders are not scanned. Read-only.

workspace_infoA

Report the workspace folder, the state directories under it (scratch, bridge, logs) and the output folder. Also reports where the folder came from (set_workspace, PIXINSIGHT_CONNECTOR_WORKSPACE or the launch folder) and, when it cannot be used, why. Read-only.

set_workspaceA

Set the workspace folder this session's files go under (scratch files, the bridge, call logs). path must name an existing, writable folder, absolute or starting with ~/, other than the filesystem root or the home directory itself. Returns the new workspace_info.

resume_bridgeA

Allow PixInsight commands again after the user pressed Pause/Abort. Call ONLY when the user explicitly tells you to continue.

list_packsA

List the runtime tool packs discovered at server startup, with load status, tool counts, why any pack was skipped, and which core tools packs replaced. Read-only.

job_statusA

Report on a job started by run_pjsr or run_pjsr_file with async: its state (queued, running, ending = stopped in PixInsight with its result not yet collected, done, failed, cancelled, stopped), elapsed time, seconds since the running script last called processEvents(), its latest mcpProgress() text, and, once it has ended, its result or error and PixInsight console errors. Without job_id: the running job, else the most recent one. Read-only; it does not use PixInsight, so it answers while a job runs.

cancel_jobA

Stop a job started by run_pjsr or run_pjsr_file with async. A job PixInsight has not started yet is removed and never runs. A running job is stopped at its next processEvents() call, where an error with MCP_CANCELLED ends the script; a native process call (a single long process, a file save) cannot be interrupted, so the stop takes effect after it returns, and what the script already changed stays changed. Without job_id: the running job. job_status reports the outcome.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 91 tools

Disambiguation4/5

Most tools have clearly distinct purposes, and detailed descriptions clarify boundaries between similar operations (e.g., run_pixelmath vs pixelmath_new_image, run_abe vs run_per_channel_abe). Minor overlap exists between generic runners (run_process, run_pjsr) and dedicated process wrappers, and save_preview/save_and_show_preview are explicitly aliased, but an agent can generally tell them apart.

Naming Consistency4/5

The vast majority of tools follow a snake_case verb_noun pattern (run_*, measure_*, list_*, get_*), with a few noun-first exceptions like catalog_stars, lrgb_combine, job_status, and workspace_info. The deviations are minor and still readable, so naming is mostly predictable.

Tool Count2/5

91 tools is far beyond the ideal 3–15 range and is excessive for effective agent selection, even for a broad image-processing suite. Many dedicated wrappers duplicate what the generic run_process or run_pjsr tools already cover, so the count is not well-scoped.

Completeness5/5

The server covers file handling, image lifecycle, many processing operations, measurement, job control, and workspace management. The generic run_process and run_pjsr/run_pjsr_file tools act as escape hatches for any missing PixInsight process, so there are no obvious dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues