Skip to main content
Glama

dm_4dstem_virtual

Computes virtual BF/ADF images and diffraction patterns from 4D-STEM datasets in chunked scan bounds, publishing independent DM images for detector-defined ROIs.

Instructions

分块计算虚拟圆形BF/环形ADF、全探测器总强度与平均/总衍射图,发布独立DM图像。每次最多8192扫描位置,分批覆盖全scan;整数uint64求和,原生发布仅允许精确dtype转换;不是硬件角度标定或HAADF认定。

Input Schema

NameRequiredDescriptionDefault
detectorsYes物理倒空间[qx,qy]中心与半开半径r_inner<=r<r_outer;单位来自显式轴标定,不推断mrad或HAADF
dataset_idYesdm_4dstem_open返回的有界文件索引id
scan_boundsYes[[scan_y0,scan_y1],[scan_x0,scan_x1]],原始NumPy坐标,右端排除
chunk_patternsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses important behavior: chunked execution, a per-call scan-position limit, uint64 integer summation, and that native publishing requires exact dtype conversion. It also notes the side effect of publishing independent DM images, though overwrite and return-payload behavior remain unstated.

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 description is dense but front-loads the core computations and then lists important constraints. Most clauses earn their place, though the semicolon-separated style is somewhat compressed.

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 compute tool with no annotations and no output schema, the description adequately covers what is computed, what is published, chunk limits, numeric precision, and exclusions. It still leaves some gaps around the return structure and image naming/reference behavior.

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 75%, so the schema already documents most parameters including dataset_id, scan_bounds, and detectors. The description reinforces scan chunking and dtype/summation behavior but does not add much parameter-level meaning beyond what the schema provides.

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 names specific computations (virtual circular BF/annular ADF, full-detector total intensity, average/total diffraction patterns) and states that standalone DM images are published. It is clearly a 4D-STEM virtual detector computation tool, distinguishable from sibling data-access and calibration tools.

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 a concrete usage constraint: at most 8192 scan positions per call and batching to cover the full scan. It also explicitly excludes hardware angle calibration and HAADF determination, though it does not name an alternative sibling for those tasks.

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