Skip to main content
Glama
systemsomicslab

ms-data-parser

dataset_load

Idempotent

Loads an mzTab-M 2.0 file from a direct path, analysis job, or pipeline run into a canonical dataset state, pulling in the run's sample mapping, feature bindings, and matrices so downstream statistics and differential analysis stay aligned.

Instructions

mzTab-M 2.0 ファイルを読み込んで正準状態(DatasetState)を作る。

呼び出し方:

  • mztab_path: .mzTab ファイルへの絶対パスを直接指定する場合。

  • job_path: analysis-job.json へのパスを指定する場合。ジョブの宣言 (polarity・measure)で正準エントリを一意に選ぶ。console_run 完了後は こちらを推奨。

  • pipeline_path: pipeline_run が返した pipeline-run.json(またはその親 ディレクトリ)を指定する場合。その run の mzTab に加えて、解決済みの 試料対応表・feature binding・解析行列も同じ run からまとめて載せる。 行列だけを別に載せる入口は置いていない——別 run の行列を混ぜると群の 対応が黙ってずれるため。載せた行列は dataset_statistic へ matrix_id で渡す。run の差次的結果も、データと群の指紋が今の データセットと一致するものだけを戻す(result_id は run の TSV と同じ。 直近の結果にはしないので result_id で名指しして使う)。戻せなかった ものは理由つきで要約に並ぶ。

3つとも省略するとエラー、2つ以上指定するとエラー。

allow_incomplete: 完了していない実行(partial / failed / running)の出力を 読み込みます(既定 False)。中断時点の生成物なので、既定では拒否します (INCOMPLETE_ANALYSIS_JOB)。True で読んだデータセットは探索専用になり、 2 群比較(dataset_differential)と差次的エクスポートは拒否されます—— 欠けた検体を「その群には無い」と読み違えたまま結論が出てしまうためです。

成功すると session.dataset に DatasetState が格納され、 dataset_status で内容を確認できる。 既存の session.arf / .arf2 / .pai2 / .eic は変更しない。

Input Schema

NameRequiredDescriptionDefault
job_pathNo
mztab_pathNo
pipeline_pathNo
allow_incompleteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, idempotent=true), it discloses the error on exclusive parameters, the `INCOMPLETE_ANALYSIS_JOB` rejection by default, and the downstream consequence that incomplete loads are exploration-only and block `dataset_differential` and differential export. It also documents state effects (DatasetState written to session.dataset, existing arf/arf2/pai2/eic untouched) and that pipeline results are returned only when data/group fingerprints match.

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?

The purpose is front-loaded and the parameter modes are formatted as a scannable list, so length is justified by density of real information. A few rationalizing asides (why no matrix-only entry point, why result_id is fingerprinted) could be trimmed without losing the operational instruction.

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

Completeness5/5

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

For a four-parameter state-building tool with no output schema, the description closes the important gaps: return behavior is covered by naming session.dataset and pointing to `dataset_status` for inspection, and the side-effect footprint on other session objects is stated. An agent has what it needs to call this correctly and interpret the outcome.

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 coverage is 0% and every parameter has only a bare title, so the description must carry the load — and it does, defining what each path type points at, what `job_path` resolves via polarity/measure, and that `pipeline_path` accepts a file or its parent directory. `allow_incomplete` is given its default, the run states it accepts, and its downstream restriction.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a specific verb and resource: read an mzTab-M 2.0 file and build the canonical DatasetState. It does not, however, distinguish itself from the very similarly named sibling `load_dataset`, leaving the agent to guess which loader to pick.

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

Usage Guidelines4/5

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

It spells out three mutually exclusive input modes, recommends `job_path` after `console_run`, and explains that `pipeline_path` is the only way to bring in matrices because mixing runs would silently misalign groups. It also states that omitting all three or passing two or more is an error, and gives explicit when-not guidance for `allow_incomplete`. The only missing routing advice is versus the `load_dataset` sibling.

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