Skip to main content
Glama

dm_2d_preview

Generate a linear-display PNG preview from a capture folder with accurate source-coordinate mapping and optional ROI/profile overlays; returns MCP image block, PNG path, and calibration.

Instructions

从 dm_2d_capture 包生成线性显示 PNG 和准确源坐标映射;可叠加 ROI 与剖面条带。显示拉伸不用于计算,返回 MCP image block、本地 PNG 路径及捕获时的标定。只看图无需调用 dm_2d_analyze;不能显示图片时明确说明,不假装看见。

Input Schema

NameRequiredDescriptionDefault
roiNo原图 source pixel 的半开边界 [x0,y0,x1,y1],须在捕获区域内
profileNo
max_sideNo最长预览边像素,默认 1024
capture_dirYesdm_2d_capture 返回的目录

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/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 does well: it discloses the return payload (MCP image block, local PNG path, capture-time calibration), the critical scientific caveat that display stretching must not be used for computation, and an explicit failure-mode instruction not to pretend to have seen an image. It does not state that a PNG file is written to disk as a side effect, which would be the remaining gap for a mutation-adjacent tool.

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 tight sentences, front-loaded with the core action and output, followed by the compute caveat and the sibling routing. No sentence is filler, and each adds 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?

There is no output schema, and the description compensates by enumerating the return contents (image block, PNG path, calibration). Combined with the display-vs-compute warning and the honest-failure instruction, an agent has enough to call it correctly; only file-write side effects and preview failure conditions are underspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so most parameters are already documented, but the description adds real semantic value by explaining what roi and profile actually do (overlay regions and profile strips on the preview) rather than just their types. max_side is left entirely to the schema, so it is not fully compensatory.

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: generate a display-linear PNG plus accurate source coordinate mapping from a dm_2d_capture directory, with optional ROI and profile overlays. It explicitly distinguishes itself from dm_2d_analyze, so an agent can route without opening either schema.

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?

Names the alternative explicitly ("只看图无需调用 dm_2d_analyze") and gives the condition that selects this tool: pure visual inspection. The inverse condition (quantitative measurement requires dm_2d_analyze) is only implied via "显示拉伸不用于计算", so exclusion guidance is not fully spelled out.

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