Skip to main content
Glama

dm_2d_capture

Captures a bounded 2D ROI from a DigitalMicrograph image into a new directory, saving pixel data, calibration, and hash so later preview and analysis use a stable copy.

Instructions

一次解析图像(默认 front),在新目录保存有界二维像素副本与标定;后续二维预览和分析固定读取该包。捕获期间请勿编辑源图;DM API 不提供像素与标定的原子快照。

Input Schema

NameRequiredDescriptionDefault
rectNo像素矩形 [x0, y0, x1, y1],右下边界不包含;必须完整位于图内,不舍入或裁夹;省略则整幅
image_idNo图像 id(来自 dm_datasets),或 "front" 表示前台窗口
output_dirYes必须是尚不存在的新 Windows 绝对目录;仅保存捕获的二维 ROI、标定与哈希

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the concurrency hazard (no atomic snapshot of pixels and calibration in the DM API), the instruction not to edit the source during capture, and exactly what the package contains (2D ROI, calibration, hash). It does not state what the call returns to the caller, which is the remaining gap given there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences with no filler: the action and output come first, followed by downstream usage, then the capture-time constraint. Each sentence contributes a distinct piece of 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?

For a 3-parameter capture tool with no annotations and no output schema, the description covers purpose, storage contents, downstream contract, and the non-atomicity race. Missing only the return payload and any failure/retry guidance, which keeps it short of a 5.

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%, including the default 'front' image_id, rect boundary semantics, and the new-directory rule, so the schema already does the heavy lifting. The description only reiterates the default image and the directory concept without adding syntax or edge-case meaning. A baseline 3 is appropriate.

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?

It states a specific verb and resource ('解析图像…保存有界二维像素副本与标定'), names the output location, and positions the tool within the workflow by noting that subsequent 2D preview and analysis read this package. An agent can distinguish it from dm_2d_preview/dm_2d_analyze, which consume, not create, the package.

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 clearly implies this is the prerequisite capture step ('后续二维预览和分析固定读取该包') and gives an exclusion ('捕获期间请勿编辑源图'). It does not name an alternative for partial needs (e.g. dm_crop for an in-memory ROI), so it stops short of full when/when-not routing.

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