SRS Residual Gas Analyzer

v0.1.1
io.github.K-Dense-AI/labmcp-srs-rga Checked 1 day ago Published 2 months ago

MCP server for SRS RGA100/200/300 residual gas analyzers.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_connection_info Get Connection Info

Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.

get_command_log Get Command Log

Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.

ParameterTypeDescription
limitinteger

reconnect Reconnect

Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).

get_status Get Status

Report the RGA state: filament emission, CDEM on/off and voltage, ionizer settings, scan settings, stored sensitivity factors, and the decoded error bytes (e.g. FL6 when the overpressure protection shut the filament down). Reading the error bytes clears the communication (EC?) and CDEM (EM?) error bytes, as on the instrument.

read_total_pressure Read Total Pressure

Measure the total pressure with the RGA acting as an ionisation gauge (TP?, Faraday cup). Needs the filament on and the CDEM off. The value is N2-equivalent and can differ from a Bayard-Alpert gauge by a factor of a few, depending on the gas composition.

measure_masses Measure Masses

Measure partial pressures at a list of m/z values (peak-locked single-mass measurements, MR). Fast and precise for monitoring known gases; the precision and time per mass are set by the noise floor (`set_scan_parameters`). Pressures are N2-equivalent.

ParameterTypeDescription
masses *arraym/z values to measure, e.g. [2, 18, 28, 32, 40, 44]

analog_scan Analog Scan

Record an analog mass spectrum (SC1): the quadrupole steps through the mass range and the full peak shapes are returned (downsampled) with a peak list, the total pressure measured at the end of the scan, and optionally the full data as CSV. Use it to check peak positions and to survey unknown gases. Duration depends on the noise floor (e.g. 126 ms/amu at NF4). An existing save_path file is never overwritten.

ParameterTypeDescription
max_pointsintegerSpectrum points returned
points_per_amuintegerSteps per amu (SA)
save_pathOptional CSV path for the full spectrum (must not exist yet)
start_massintegerFirst m/z
stop_massintegerLast m/z

histogram_scan Histogram Scan

Record a bar-graph spectrum (HS1): one peak-locked value per integer m/z plus the total pressure. Faster than an analog scan and the usual way to follow a residual gas composition.

ParameterTypeDescription
save_pathOptional CSV path (must not exist yet)
start_massintegerFirst m/z
stop_massintegerLast m/z

leak_check Leak Check

Helium leak check: monitor m/z 4 while someone sprays helium on suspect joints, and report the baseline, every response above `threshold_factor` x baseline (start/end time, peak) and the time series. Keep the first few seconds free of helium so the baseline is clean. The response time of a real leak is a few seconds. Bounded by `max_leak_check_duration_s`.

ParameterTypeDescription
baseline_pointsintegerReadings used for the baseline
duration_snumberHow long to monitor
interval_snumberSeconds between readings
max_pointsintegerPoints returned
mzintegerTracer gas m/z (4 = helium)
save_pathOptional CSV file for every reading (must not exist yet)
threshold_factornumberSignal/baseline ratio that counts as a leak response

identify_residual_gases Identify Residual Gases

Run a histogram scan and assign the major peaks to likely gases with a simple lookup of standard 70 eV fragment patterns: H2 (2), He (4), CH4 (16/15), H2O (18/17), N2 or CO (28, split with 14 and 12), O2 (32), Ar (40), CO2 (44), plus diagnoses such as an air leak or hydrocarbon contamination. A screening aid, not a quantitative analysis.

ParameterTypeDescription
stop_massintegerScan m/z 1 up to this mass

set_scan_parameters Set Scan Parameters

Change measurement settings: noise floor (speed vs detection limit), electron energy, ion energy, focus plate voltage and analog-scan resolution. Sensitivity factors stored in the head are only valid at the default ionizer settings (70 eV, 12 eV, 90 V). After changing the noise floor the detector zero is re-adjusted automatically at the start of the next scan.

ParameterTypeDescription
electron_energy_evDefault 70 eV
focus_voltage_vFocus plate, default 90 V
ion_energylow = 8 eV, high = 12 eV
noise_floor0 = slowest/lowest noise ... 7 = fastest (default 4)
points_per_amuAnalog scan steps per amu

set_filament Set Filament

Switch the filament on (or change its emission current). The filament burns out or is damaged above 1e-4 Torr, so this is refused unless the pressure is below `max_filament_pressure_torr`: pass `external_pressure_torr` from a separate gauge, or, if the filament is already on, the RGA's own total pressure is measured. The RGA's protection will also shut the filament down on overpressure (reported as FL6).

ParameterTypeDescription
emission_current_manumberElectron emission current; 1.0 mA is the standard setting
external_pressure_torrPressure just read on a separate vacuum gauge, confirmed by the user

set_cdem Set Cdem

Switch the electron multiplier (CDEM) on at a given high voltage for ~100-10000x more signal. High pressure shortens CDEM life and can destroy it, so this is refused unless the pressure is below `max_cdem_pressure_torr` (RGA total pressure measured now with the Faraday cup, a recent one, or `external_pressure_torr`), and the voltage is capped by `max_cdem_voltage_v`. Total-pressure readings are disabled while the CDEM is on.

ParameterTypeDescription
external_pressure_torrPressure just read on a separate vacuum gauge, confirmed by the user
voltage_vintegerCDEM high voltage (magnitude); typical 1000-1600 V, default 1400

degas Degas

Start an ionizer degas (DG): 20 mA of 400 eV electrons clean the ion source by electron stimulated desorption. The CDEM is switched off and left off. Degassing shortens filament life; prefer a bakeout. Refused above `max_filament_pressure_torr` and beyond `max_degas_minutes`. Returns immediately; the RGA is busy until it finishes (any command would abort it), and `filament_off` / `all_off` stop it.

ParameterTypeDescription
external_pressure_torrPressure just read on a separate vacuum gauge, confirmed by the user
minutesintegerDegas time incl. the 1-minute ramp

calibrate Calibrate

Calibrate the detector: `zero` (CA) re-zeroes the ion detector at the present noise floor and detector and corrects the RF scan table for temperature drift (seconds); `electrometer` (CL) recalibrates the electrometer's full I-V response (longer, clears all zero offsets). The quadrupole RF is switched off at the end.

ParameterTypeDescription
kindstringzero = CA (re-zero detector + mass axis correction); electrometer = CL (full I-V)

filament_off Filament Off

Switch the filament off (FL0), stopping a degas first if one is running. Always allowed, and it interrupts a running scan, mass measurement or leak check.

cdem_off Cdem Off

Switch the electron multiplier off (HV0) and return to Faraday-cup detection. Always allowed, and it interrupts a running scan, mass measurement or leak check.

all_off All Off

Put the RGA in a safe state: abort any degas, CDEM off (HV0), filament off (FL0) and quadrupole RF/DC off (MR0). Use when finished, before venting, or if anything looks wrong. It interrupts a running scan or leak check, and every step is attempted even if an earlier one fails.