Skip to main content
Glama
systemsomicslab

ms-data-parser

dataset_build_matrix

Read-only

Constructs an analysis matrix from session dataset state via a recipe, validates prerequisites, and returns a matrix ID for statistical analysis.

Instructions

v2 の解析行列(analysis-matrix.v1)を、セッションの DatasetState から1本作る。

recipe: profile の matrix_recipes の1要素と同じ形 (base / normalize / drift_correct / filter / impute の5キー。 過不足はそのまま拒否する)。検証は profile と同じ規則を共有しているので、 pipeline 経由より緩い recipe がここから入ることはない。 recipe_id: 行列の識別に使う名前。matrix_id は recipe 内容と dataset・ metadata から決まるので、同じ dataset に同じ recipe を与えれば同じ ID になる(pipeline が作った行列と突き合わせられる)。

揃っていない前提を揃ったことにしない:

  • base="internal_standard_ratio" は対象feature↔内部標準の対応付けが要る。 この単体ツールは対応付けを作らないので missing_state で止める (空の対応付けで「比」を名乗る行列を作らない)。

  • 検出状態が分からない dataset に filter.min_detection_rate を指定しても feature は落ちない。history に not_evaluable が残る。

値そのものは戻り値に載せず session に保持する。dataset_statistic へは 戻り値の matrix_id を渡す。

Input Schema

NameRequiredDescriptionDefault
recipeYes
recipe_idNodefault

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only supply readOnlyHint, so the description carries most of the burden and does so well: it discloses that validation rules are shared with the pipeline, that a missing feature-to-internal-standard mapping aborts with `missing_state` rather than producing a fake ratio matrix, and that `filter.min_detection_rate` silently no-ops with `not_evaluable` recorded in `history`. It also states values are held in session rather than returned. Not a full 5 because repeat-call/overwrite behavior for an existing `recipe_id` is unstated.

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 artifact and its source are front-loaded in the first sentence, then parameters, then failure modes are grouped into labeled blocks, which reads efficiently. The bulleted caveats each carry distinct information, though the recipe paragraph is denser than necessary.

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?

With no output schema, the description correctly covers the return contract (values stay in session, only `matrix_id` is handed off to `dataset_statistic`) and both known failure paths. What an agent needs to call it correctly is essentially present; only the shape of the returned object and idempotency of re-calling with the same `recipe_id` are missing.

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?

Schema coverage is 0% and `recipe` is an untyped object with additionalProperties, so the description must compensate, and it does: it enumerates the five recipe keys and states that under- or over-specified recipes are rejected outright. It also clarifies the subtle `recipe_id` versus derived `matrix_id` distinction. It does not document the value domains of the individual recipe keys, keeping it below 5.

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 first line gives a specific verb and resource: build exactly one v2 analysis matrix (analysis-matrix.v1) from the session's DatasetState. It also distinguishes the artifact from pipeline-produced matrices by noting the deterministic matrix_id allows cross-matching. It stops short of naming a sibling to use instead, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

It states the recipe must match one element of the profile's `matrix_recipes` (five keys, extra/missing rejected), which implies the context of use, and it routes the agent onward by saying to pass `matrix_id` to `dataset_statistic`. However, it never says explicitly when to use this standalone tool versus `pipeline_run` or `dataset_preprocess`, leaving the choice to inference.

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