Skip to main content
Glama
systemsomicslab

ms-data-parser

console_plan

Creates an MS-DIAL Console execution plan and analysis-job.json from raw data, resolving method and library files, validating polarity/omics settings, and preparing the job for execution.

Instructions

MS-DIAL Console の実行計画を作成し、analysis-job.json を生成します。

Parameters

dataset_root: 生データフォルダのパス。MS-DIAL が読む 12 形式 (.abf / .ibf / .cdf / .mzml / .wiff / .raw / .d / .wiff2 / .qgd / .lcd / .lrp / .imzml)が入っているフォルダを指します。 Agilent・Bruker の .d と Waters の .raw はフォルダが 1 検体です。 リポジトリ外のパスを指定してください。 method_file: MS-DIAL Console のパラメータファイル(ASCII テキスト。key: value 形式)。 省略できます — 省略時は dataset_root 直下・兄弟フォルダ・過去 run (runs/*/analysis-job.json)まで探し、Ion mode が polarity と 一致する最新のものを使います。一致が無く別極性の候補があれば METHOD_FILE_CHOICE_REQUIRED で止まります(候補の列挙だけなら console_method_candidates)。 .mdproject / .mddata は使えません(ZIP なので Console は中身を 読めず、全パラメータが既定値のまま実行されます)。 lbm_file: 脂質ライブラリ(.lbm2)のパス。省略時は「メソッドファイルの宣言 → ビルド生成物(MsdialWorkbench をソースからビルドしている場合) → [msdial] lbm(lipidmix.local.toml)か環境変数 MSDIAL_LBM → Console の実行体([msdial] exe / MSDIAL_EXE)と同じフォルダ」の順に、MS-DIAL GUI と 同じ規則で自動解決します。GUI 由来のパラメータは Lbm file path: が 必ず空なので、この自動解決が無いと警告なしで同定 0 件になります。 自動補完(宣言より後ろの 3 つ)は lipidomics だけです。引数と宣言は metabolomics でも使います(Console は omics を問わず LBM で脂質を同定する)。 解決した LBM と、相対で宣言されたライブラリ類のパス(Msp file path Text DB file path 等)は、メソッドファイル基準の絶対パスにして run_dir/effective-method.txt へ書きます(Console は相対パスを 自分の作業フォルダ基準で読み、見つからなければ黙って飛ばすため)。 polarity: "positive" または "negative"。 measure: "peak_height"(既定)または "peak_area_above_zero"。 現行 MS-DIAL Console は peak_height のみ正確に出力します。 "peak_area_above_zero" を指定すると UNSUPPORTED_AREA_CONSOLE で停止します。 omics: "lipidomics"(既定)または "metabolomics"。 save_project: True(既定)なら MS-DIAL Console に -p を渡し、GUI で開ける .mdproject を出力フォルダに生成させます。 timeout_s: MS-DIAL Console のタイムアウト秒数(既定 21600 = 6 時間)。 実測では 4 サンプルで約 3 分。60 サンプル規模では 1 時間を超え得ます。 keep_extension: アライメントする計測形式(例 "wiff" / "wiff2")。dataset_root に形式が 混在しているとき(SCIEX は 1 測定につき .wiff と .wiff2 ができる)に 使います。省略して混在していれば、選べる形式を choices に入れた MIXED_RAW_FORMATS を返すので、そこから選んで呼び直してください。 指定すると、その形式の計測ファイルと随伴ファイルだけを集めたフォルダを <元フォルダ>_<拡張子> にハードリンクで作り(既にあれば欠けている分だけ 補う)、そちらで計画します。元フォルダは変更しません。 library_mode: "auto"(既定)か "msp_only"。"msp_only" は LBM を使わず、研究室の参照ライブラリ (.msp)だけで同定する: 実効メソッドの Lbm file path を空にし、Msp file path に msp_file か極性の設定(環境変数 MSDIAL_MSP_POS / MSDIAL_MSP_NEG → lipidmix.local.toml の [library] msp_positive / msp_negative)を書き、メソッドが宣言する Text DB と MSP / Text の注釈器設定表を空にする(消したキーは removed_declarations)。 メソッドの Msp file path の宣言は使わない。MSP が決まらなければ MSP_NOT_CONFIGURED / MSP_NOT_FOUND で止まり、ジョブを作らない。lbm_file とは同時に指定できない。 戻り値の msp はファイル名と出どころだけで、ライブラリの置き場所は返さない。 msp_file: library_mode="msp_only" で使う MSP の明示パス(設定より優先)。"auto" では指定できない。

成功すると session.current_job_path にジョブパスが設定され、 console_run でそのまま実行できます。

Input Schema

NameRequiredDescriptionDefault
omicsNolipidomics
measureNopeak_height
lbm_fileNo
msp_fileNo
polarityNopositive
timeout_sNo
method_fileNo
dataset_rootYes
library_modeNoauto
save_projectNo
keep_extensionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, and the description adds real context beyond them: it writes analysis-job.json and run_dir/effective-method.txt, hardlinks into a new <folder>_<ext> directory while leaving the original untouched, and sets session.current_job_path on success. However, it never confirms or explains the non-idempotent framing (the hardlink step is described as incremental/top-up, which an agent could read as repeat-safe), leaving a mild tension with idempotentHint=false.

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?

Front-loaded one-sentence purpose followed by a scannable per-parameter block, with no filler sentences. It is very long, but for 11 undocumented parameters at 0% schema coverage most of the length is load-bearing; a few passages (e.g. the LBM resolution chain detail) go deeper than an agent likely needs to select and call the tool.

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 non-read-only tool with no output schema and 11 undocumented parameters, the description covers prerequisites, failure codes, side effects, and the success outcome (session.current_job_path). What is thin is the shape of the returned plan object beyond the job path and the enumerated error identifiers, so an agent knows the exit paths but not the full payload.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the full load, and it does: all 11 parameters are explained with defaults, accepted values, mutual exclusions (lbm_file vs library_mode='msp_only'), precedence rules, and the error each violation produces. It adds semantics the bare schema cannot, e.g. that .mdproject/.mddata are unusable and that missing LBM resolution silently yields zero identifications.

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?

Opening line states a specific verb and artifact: builds an MS-DIAL Console execution plan and generates analysis-job.json. It is clearly distinguishable from console_run (executes) and console_method_candidates (only lists candidates), both of which are named in the body.

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?

Extensive when-to-use guidance: method_file omission behavior with METHOD_FILE_CHOICE_REQUIRED, keep_extension handling with MIXED_RAW_FORMATS and the instruction to re-call with a choice, measure='peak_area_above_zero' stopping with UNSUPPORTED_AREA_CONSOLE, and explicit routing to console_method_candidates and console_run. Alternatives and failure exits are spelled out rather than implied.

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