Skip to main content
Glama
systemsomicslab

ms-data-parser

save_figure

Idempotent

Saves the current figure to reports/figures as a PNG only when the user explicitly requests it, using kind and analysis_id to name the file.

Instructions

明示的なユーザー要求時だけ、直近の図を reports/figures/<analysis_id>_.png に保存する。

kind: "pca"(arf_parser / arf_pca_preprocessed / arf_pca_species / dataset_pca のスコア。 arf_pca_species の結果は source="species")/ "volcano" (arf_differential / dataset_differential。間引き前の全点)/ "eic"(eic_plot_chromatograms / eic_plot_compounds)/ "group_intensity"(arf_plot_group_intensity。dpi 300 の PNG と同名 .svg)/ "species"(arf_plot_species。dpi 300 の PNG と同名 .svg)/ "pca_loadings"(plot_pca_loadings。dpi 300 の PNG と同名 .svg)。 source / result_id: kind が pca / volcano のときだけ使う。"auto"(既定)はどちらも優先せず、 有効な結果が 2 つ以上あると AMBIGUOUS_RESULT_SOURCE で止まる("arf" / "mztab"、kind="pca" のときだけ "species"(arf_pca_species)でも指定できる)。 通常の対話描画では呼ばない(各描画ツールが画像を返す)。返り値の相対パスは write_report の 本文に ![...](figures/<analysis_id>_<kind>.png) として埋め込める。

Input Schema

NameRequiredDescriptionDefault
kindYes
titleNo
sourceNoauto
result_idNo
analysis_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations, it explains the fixed output path, the PNG/SVG behavior for certain kinds, and the AMBIGUOUS_RESULT_SOURCE failure when source selection is ambiguous. It does not explicitly state overwrite behavior, though idempotentHint and the fixed filename make that largely inferable.

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 leading sentence front-loads the core rule, and the kind mapping is lengthy but necessary because the schema has no enum descriptions. The structure is dense but largely earns its length.

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 five-parameter write tool with no output schema, the definition covers the key invocation rules, kind semantics, ambiguity handling, and return-path usage. Minor gaps remain around title and the origin/meaning of analysis_id.

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

Parameters3/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 all meaning. It does a good job explaining kind values and the conditional source/result_id behavior, but title is entirely unmentioned and analysis_id is only implied through the path template.

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 description gives a precise verb and resource: save the most recent figure to a specific reports/figures path. It also distinguishes this tool from sibling plotting tools by stating that normal interactive rendering should not call it because each plotting tool already returns an image.

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?

It explicitly limits use to explicit user requests and explicitly says not to call it during ordinary plotting. It also names the alternative behavior: each plotting tool returns the image directly, so this tool is only for deliberate persistence.

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