Skip to main content
Glama

dm_spectrum_export

Export a spatially reduced, energy-windowed spectrum from a DigitalMicrograph dataset to a new CSV with a metadata sidecar, preserving the original data.

Instructions

按 dm_spectrum 的空间归约与能量选择导出新 CSV(energy_eV,intensity;强度为 float64)和元数据侧文件,禁止覆盖或写回原始数据。实验性基础接口;真实 EDS/EELS/SI 为 NOT_TESTED(未验证),仅合成数据覆盖。不自动识别谱种,不作背景扣除或元素/化学定量,不假定强度单位;拒绝 4D 衍射或 nm 标定能量轴。

Input Schema

NameRequiredDescriptionDefault
pathYes新 CSV 文件的 Windows 绝对路径,扩展名必须为 .csv;禁止覆盖
image_idYesdm_datasets 返回的明确图像 id;不接受 front,避免窗口切换改变数据集
reductionNo所选空间范围的逐通道 sum 或 mean;默认 sum;float64 运算,不假定强度单位为 counts
energy_axisYesNumPy 轴序中的能量轴,0 起始(不是 DM 维号);必须具有 eV 或 keV 标定。支持 1D/2D/3D,拒绝 4D 衍射
spatial_boundsNo其余空间轴按 NumPy 原始顺序的 [start,stop) 边界;显式提供时必须覆盖所有空间轴。每对 start<stop,不裁夹越界值;省略则全部空间范围
energy_window_eVNo以 eV 表示的半开区间 [low,high),按原始通道中心 low<=E<high 选择,不插值或背景扣除

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses the experimental/NOT_TESTED status with synthetic-only coverage, the non-destructive write policy, float64 arithmetic, and the deliberate refusal to assume intensity units. These are exactly the behavioral traits an agent needs before calling a file-writing tool.

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?

Front-loaded with the core action and output format, then limitations. Dense but every clause adds a constraint or exclusion; slightly long single-block sentences could break more cleanly, but there is little wasted text.

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?

For a 6-parameter tool with no annotations and no output schema, the description supplies the missing pieces: the produced file format and dtypes, the sidecar metadata output, the write-safety guarantee, and the scope of supported data. Nothing an agent needs to invoke it correctly is absent.

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 coverage is 100%, so the schema already documents every parameter including path, image_id, reduction, energy_axis, spatial_bounds and energy_window_eV. The description reinforces a few semantics (energy window selection, no interpolation/background subtraction, no unit assumption) but mostly repeats schema content, so baseline 3 applies.

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 and resource: export a new CSV with named columns (energy_eV, intensity as float64) plus a metadata sidecar, derived from dm_spectrum's spatial reduction and energy selection. The 'new file, never overwrite or write back' framing distinguishes it from in-place analysis siblings like dm_spectrum and dm_spectrum_integrate.

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?

Explicitly enumerates when-not conditions: no spectrum-type auto-detection, no background subtraction, no elemental/chemical quantification, rejects 4D diffraction and nm-calibrated energy axes. It references dm_spectrum as the upstream source, though it does not name which sibling to use for the excluded tasks (e.g., quantification), so routing beyond 'don't use this' is incomplete.

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