Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion)
v0.1.1MCP server for LC-MS data in mzML/mzMLb and Bruker timsTOF files; vendor formats via msconvert.
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.
| Parameter | Type | Description |
|---|---|---|
limit | integer |
reconnect Reconnect
Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).
list_runs List Runs
Find mass-spectrometry runs in the data folder and detect each one's vendor and format (mzML/mzML.gz/mzMLb, Bruker .d TDF or BAF, Agilent .d, Thermo .raw, Waters .raw folder, SCIEX .wiff/.wiff2, Shimadzu .lcd, mzXML). `readable_directly=false` means the run must be converted with convert_to_mzml before it can be analysed.
| Parameter | Type | Description |
|---|---|---|
max_results | integer | |
recursive | boolean | Also search subfolders (up to 6 levels) |
subfolder | string | Folder to search, relative to the data folder |
get_run_info Get Run Info
Describe one run: instrument vendor/model/serial (when the file records them), acquisition date, software, number of spectra per MS level, retention-time and m/z ranges, polarity, centroid/profile, and whether ion-mobility data is present. The first call on a large file indexes it (can take a while); later calls are instant.
| Parameter | Type | Description |
|---|---|---|
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run |
get_tic Get Tic
Total ion chromatogram (sum of all intensities per spectrum vs retention time) for one MS level, downsampled to `max_points` (keeping the maximum in each bin so peaks survive). Returns the apex, median and area; `save_path` writes every point to CSV.
| Parameter | Type | Description |
|---|---|---|
max_points | integer | Maximum points returned (downsampled, max per bin) |
ms_level | integer | MS level to use (1 = survey scans) |
overwrite | boolean | Allow replacing an existing save_path file |
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run | |
rt_end_min | Only use spectra at or before this RT (min) | |
rt_start_min | Only use spectra at or after this RT (min) | |
save_path | Optional new .csv file inside the data folder for the full-resolution data |
get_bpc Get Bpc
Base peak chromatogram (intensity of the most intense peak per spectrum, with its m/z) vs retention time, downsampled to `max_points`. Cleaner than the TIC for spotting eluting compounds; the base-peak m/z tells you which ion dominates each part of the run.
| Parameter | Type | Description |
|---|---|---|
max_points | integer | Maximum points returned (downsampled, max per bin) |
ms_level | integer | MS level to use (1 = survey scans) |
overwrite | boolean | Allow replacing an existing save_path file |
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run | |
rt_end_min | Only use spectra at or before this RT (min) | |
rt_start_min | Only use spectra at or after this RT (min) | |
save_path | Optional new .csv file inside the data folder for the full-resolution data |
extract_ion_chromatogram Extract Ion Chromatogram
Extracted ion chromatogram (XIC/EIC) for one or more m/z values: the summed intensity within ± tolerance (ppm or Da) in every MS1 spectrum (or another `ms_level`). For each target returns the apex RT and intensity, the apex peak's boundaries, area (intensity x min, no baseline subtraction) and FWHM, plus a downsampled trace. Reads every spectrum in the RT window, so restrict `rt_start_min`/`rt_end_min` on long runs.
| Parameter | Type | Description |
|---|---|---|
mz * | array | Target m/z value(s) |
max_points | integer | Maximum points returned (downsampled, max per bin) |
ms_level | integer | MS level to use (1 = survey scans) |
overwrite | boolean | Allow replacing an existing save_path file |
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run | |
rt_end_min | Only use spectra at or before this RT (min) | |
rt_start_min | Only use spectra at or after this RT (min) | |
save_path | Optional new .csv file inside the data folder for the full-resolution data | |
tolerance | number | m/z tolerance (± this value) |
tolerance_unit | string | Tolerance unit: ppm or da |
get_spectrum Get Spectrum
Read one spectrum, chosen by `index`, `scan_number`, `native_id` or nearest `rt_min` (give exactly one). Returns MS level, RT, polarity, centroid/profile, precursor m/z and charge for MS2, a summary (peak count, TIC, base peak, m/z range) and the `top_n` most intense peaks; `save_path` writes the full peak list to CSV. For profile spectra the top peaks are local maxima of the profile.
| Parameter | Type | Description |
|---|---|---|
index | 0-based spectrum index in the file | |
ms_level | With rt_min: MS level to pick (default 1) | |
mz_max | Only consider peaks below this m/z | |
mz_min | Only consider peaks above this m/z | |
native_id | Exact native spectrum id | |
overwrite | boolean | Allow replacing an existing save_path file |
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run | |
rt_min | Pick the spectrum nearest this RT (min) | |
save_path | Optional new .csv file inside the data folder for the full-resolution data | |
scan_number | Native scan number (e.g. Thermo scan=N) | |
top_n | integer | Number of most intense peaks to return |
find_ms2_scans Find Ms2 Scans
Find the MS2 (MSn) spectra whose precursor m/z is within ± tolerance of `precursor_mz`, optionally within an RT window and for one charge state. Returns index, scan number, RT, precursor m/z, error in ppm, charge and intensity; open any hit with get_spectrum.
| Parameter | Type | Description |
|---|---|---|
precursor_mz * | number | Precursor m/z to look for |
charge | Only this precursor charge | |
max_results | integer | |
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run | |
rt_end_min | Only use spectra at or before this RT (min) | |
rt_start_min | Only use spectra at or after this RT (min) | |
tolerance | number | m/z tolerance (± this value) |
tolerance_unit | string | Tolerance unit: ppm or da |
summarise_run Summarise Run
Quick QC of a run: MS1/MS2 counts, TIC stability (CV, spray dropouts), where the signal elutes, cycle time, MS2 scans per cycle, median injection times and how often MS2 hit the maximum injection time, and precursor charge states. Returns plain-language warnings.
| Parameter | Type | Description |
|---|---|---|
path | Run path relative to the data folder (from list_runs); may be omitted if there is one run |
convert_to_mzml Convert To Mzml
Convert a vendor file (Thermo .raw, Waters .raw, Agilent .d, SCIEX .wiff, Shimadzu .lcd, Bruker .d) to mzML with the converter the user installed (ThermoRawFileParser, ProteoWizard msconvert, or msconvert in Docker; chosen with --option converter=...). Writes a new file in the data folder. Can take minutes; fails with install instructions if no converter is set up.
| Parameter | Type | Description |
|---|---|---|
path * | string | Vendor file or folder (from list_runs), relative to the data folder |
dry_run | boolean | Only show the command that would be run |
gzip | boolean | Write .mzML.gz |
output_folder | Folder for the .mzML, inside the data folder (default: next to the input) | |
overwrite | boolean | Replace an existing output file |
peak_picking | boolean | Centroid with the vendor algorithm during conversion |
timeout_s | number | Give up after this many seconds |