Skip to main content
Glama
systemsomicslab

ms-data-parser

dataset_set_sample_metadata

Idempotent

Reads and validates a sample-manifest sheet, then applies all sample metadata to the dataset in one atomic update while invalidating the affected preprocessing and analyses.

Instructions

実験情報シート(sample-manifest.v1)を読み込み、検証してから DatasetState へ 一括適用する(spec §7.3)。

上流のConsole実行をやり直さずに、群・バッチ・注入順・qc_pool などの誤記入を このツール単体で訂正できる。列の意味・拒否条件は sample-manifest.v1 の仕様 (docs/superpowers/specs/2026-09-05-raw-folder-pipeline-integrity-and-metadata-design.md §7.2)を参照。

検証は全件そろってから一括反映する(一部だけ適用される状態は作らない)。 シートに不備があれば session.dataset を一切変更せずエラーを返すので、 そのまま再送してよい。

前処理入力(role/batch/injection_order/qc_pool/include/sample_id/source_file)が 変われば前処理済み行列ごと・PCA・差次的解析まで無効化する。group だけの変更なら 差次的解析だけを無効化し、PCA は生かしたまま返す(changed_fields で確認できる)。

dataset_differential を直接呼ぶ経路(比較する2群のサンプル名を都度自分で 組み立てる)とは別に、比較を明示するのは pipeline 側の役割になる——群名だけで 対照/処置の向きを決めない・QC/blank/unknown/include=false を混ぜない・完全交絡を 止める、という前提検証は resolve_comparison/run_comparison(内部関数)が持つ。

Input Schema

NameRequiredDescriptionDefault
manifest_pathYes

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?

Goes well beyond the annotations by disclosing all-or-nothing validation ('no partial application'), that errors leave session.dataset untouched and can be safely resent, and the precise invalidation cascade (preprocessing-input changes kill matrices/PCA/differential; group-only changes kill only differential and preserve PCA). This is exactly the mutation-safety context an agent needs.

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 core purpose is front-loaded and each substantive sentence (validation atomicity, invalidation rules, changed_fields) adds new information. The closing paragraph on resolve_comparison/run_comparison is somewhat tangential but still connects to the sibling relationship.

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 single-parameter mutation tool, the description covers validation behavior, failure semantics, invalidation consequences, and idempotency-relevant resend safety. The only gap is relying on an external spec for column meanings, which is acceptable given the tool's scope.

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

Parameters4/5

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

Only one parameter (manifest_path) with 0% schema coverage, so the description must carry the meaning. It does so by naming the manifest format (sample-manifest.v1) and the columns it expects (role/batch/injection_order/qc_pool/include/sample_id/source_file), though it defers exact type/format to an external spec doc.

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?

States a specific verb chain (read → validate → bulk-apply) on a specific resource (sample-manifest.v1 into DatasetState), and explicitly positions itself against the dataset_differential path. An agent can tell exactly what it does and what it is not.

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?

Explains the primary use case (correcting group/batch/injection_order/qc_pool mistakes without re-running the upstream Console) and contrasts it with calling dataset_differential directly. It gives clear context but does not enumerate explicit 'do not use when' exclusions.

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