Skip to main content
Glama
systemsomicslab

ms-data-parser

sample_search

Read-only

Search samples by factor tokens across Class ID and sample names, then return FileIDs and real file paths for direct use in pai2, dcl, and EIC workflows.

Instructions

因子トークンでサンプルを検索し、FileID と実ファイルパスを返す。

MS-DIAL の Class ID には実験デザインの全因子が入らない(時点・複製・測定日は サンプル名にしか無いことがある)。本ツールは Class ID とサンプル名を統合した トークン空間で検索し、pai2 / dcl / EIC が直接使える形で結果を返す。

  • specs: _ 区切りの因子トークン指定のリスト(要素内 AND・順不同、要素間 OR)。 例 ["ILG_6h"], ["ILG_6h","control_6h"]。省略すると全サンプルと token_vocabulary(何で絞れるかの語彙一覧)を返す。

  • directory: 探索先。省略時は既定のデータディレクトリ。ロード済み ARF があれば そのサンプル名を優先して使う。

  • extensions: 実パスを引く拡張子(既定 [".pai2", ".dcl"])。複数バッチが 混在していても最新バッチを自動選択する。

  • include_roles: 結果に含める role。省略時は全 role を返す(role フィールドで 判断できるため検索側では絞らない)。["sample"] で QC/blank を落とせる。

返り値の各サンプルは name / file_id / class_id / role / tokens / files{拡張子: 実パス}。file_id は eic_plot_chromatograms(file_ids=[...])、 files[".pai2"] は pai2_parser(file_path=...) にそのまま渡せる。

Input Schema

NameRequiredDescriptionDefault
specsNo
directoryNo
extensionsNo
include_rolesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description adds substantial behavior beyond that: the default-everything semantics of omitted arguments, automatic latest-batch selection when multiple batches are mixed, preference for sample names from a loaded ARF, and default extensions. It also documents the exact return fields and how they feed other tools.

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?

Purpose is front-loaded in one sentence, followed by a rationale paragraph and tight per-parameter bullets with zero filler. It is longer than strictly necessary and repeats default behavior for both `specs` and `include_roles`, but every section is load-bearing.

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?

With no output schema and zero schema description coverage, the description fully compensates: it enumerates the returned fields (name, file_id, class_id, role, tokens, files) and names the downstream consumers that accept them. An agent has everything needed to call it and use the result.

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 carries the full load, and it does: each of the four parameters gets meaning, default, and semantics — including the AND-within-element / OR-across-elements rule for `specs` with concrete examples, which the schema cannot express.

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?

The opening line names a specific verb and resource (searching samples by factor tokens, returning FileID and real file paths) and immediately explains why the tool exists: MS-DIAL Class IDs do not contain all experimental design factors, so a unified Class ID + sample name token space is searched. This makes it distinguishable from a plain file lister like list_data_files or from eic_search.

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 gives clear conditional behavior: omitting `specs` returns all samples plus `token_vocabulary` (a discovery path), and `include_roles: ["sample"]` drops QC/blank. It frames the tool relative to Class-ID-based approaches rather than naming a specific sibling tool as an alternative, so it stops just short of explicit when/when-not routing.

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