Skip to main content
Glama

dm_spectrum

Extract raw channel centers and float64 intensities, reduce spatial regions by sum/mean, and select energy windows with low<=E<high. For calibrated 1D-3D spectra; no 4D diffraction or quantification.

Instructions

提取原始通道中心与 float64 强度,按空间范围作 sum/mean;能量窗采用 low<=E<high。实验性基础接口;真实 EDS/EELS/SI 为 NOT_TESTED(未验证),仅合成数据覆盖。不自动识别谱种,不作背景扣除或元素/化学定量,不假定强度单位;拒绝 4D 衍射或 nm 标定能量轴。

Input Schema

NameRequiredDescriptionDefault
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.1/5.0
Behavior5/5

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

No annotations, so the description bears the full burden: it discloses experimental status, synthetic-only coverage, float64 arithmetic, no unit assumption, no interpolation or background subtraction, and half-open window semantics. These are exactly the behavioral facts an agent needs before calling a real-data spectrum pipeline.

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?

One dense paragraph that front-loads the operation and then layers constraints, with zero filler. Slightly compressed (many clauses chained with semicolons), but every clause carries load-bearing information.

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 still conveys the return content (channel centers plus float64 intensities), and the validation/limitation surface is well covered. It could be more explicit about the returned array shape, but for a 5-param tool with full schema coverage this is close to complete.

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% and every parameter already carries a detailed description (energy axis NumPy ordering, non-clamping spatial bounds, [low,high) window). The description only restates the window and reduction semantics, adding little beyond the schema. Baseline 3 is appropriate.

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 description states a specific verb and resource: it extracts raw channel centers and float64 intensities and reduces them by sum/mean over a spatial range. It also scops what spectrum data is accepted (eV/keV energy-axis calibration, no 4D diffraction). It doesn't name siblings such as dm_spectrum_integrate, so differentiation is implicit rather than explicit.

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?

Clear negative guidance: no background subtraction, no spectrum-type auto-identification, no element/chemical quantification, no unit assumption, rejects 4D diffraction and nm-calibrated axes. The 'experimental, real EDS/EELS/SI NOT_TESTED, synthetic only' note gives a strong when-not-to-trust signal. Missing explicit routing to an alternative tool for the excluded cases.

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