Skip to main content
Glama

dm_export

Exports an image or dataset to a new file in dm3, dm4, tif, npy, csv, or txt format, refusing to overwrite existing files and attaching calibration sidecar data.

Instructions

导出到新文件,禁止覆盖。dm3/dm4 使用明确 DM writer;TIFF 使用保留原始 dtype 的无压缩科学数据 writer,附嵌入标定;所有格式附标定侧文件。支持 npy/csv/txt/tif/dm3/dm4,拒绝未经定义的 PNG 强度映射。

Input Schema

NameRequiredDescriptionDefault
pathYes绝对路径,目录不存在会自动创建
formatNodm3 / dm4 / tif / npy / csv / txt;省略时按扩展名推断,PNG 尚不支持
image_idNo图像 id(来自 dm_datasets),或 "front" 表示前台窗口

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so well: it discloses overwrite prohibition, writer selection per format, dtype-preserving uncompressed TIFF output with embedded calibration, and calibration side files for every format. It stops short of stating error behavior when the target file already exists or what is returned, but the key behavioral traits are covered.

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?

A single dense paragraph that front-loads the core constraint (new file, no overwrite) and then proceeds format by format. Every clause is substantive, though the compressed technical phrasing makes it slightly harder to scan.

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

Completeness3/5

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

For a three-parameter export tool with no output schema and no annotations, the description covers format-specific writing behavior and side-file generation but omits what the tool returns (path, list of side files?) and how it fails when the target exists. Adequate but with clear gaps.

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 100%, so the schema already documents path, format, and image_id in detail. The description's format list and PNG rejection merely restate what the schema's format parameter already says, adding no new parameter semantics beyond the baseline.

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?

States a specific verb and resource ('导出到新文件' – export to a new file) and enumerates supported formats, so the agent knows this writes datasets to disk. It does not, however, distinguish itself from the sibling dm_spectrum_export, leaving ambiguity about which export path applies to spectra vs images.

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?

The description establishes key usage constraints ('禁止覆盖' – no overwrite, and PNG is rejected) and implies format selection, but gives no explicit when-to-use guidance against sibling tools such as dm_spectrum_export or dm_2d_capture. The agent must infer the intended scope from the format list.

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