Skip to main content
Glama

dm_fft

Computes a 2D FFT for an image or ROI, returning mean-subtracted DC, strongest spectral lattice coordinates, and calibrated spatial frequencies/spacings.

Instructions

二维 FFT:返回去均值后的 DC、频谱格点坐标与按两个方向标定换算的空间频率/间距。d_pix 仅为频谱格点半径,不能当作 1/pixel 或晶格间距。

Input Schema

NameRequiredDescriptionDefault
rectNo像素矩形 [x0, y0, x1, y1],右下边界不包含;必须完整位于图内,不舍入或裁夹;省略则整幅
top_nNo返回最强频谱格点数,默认 12;不等同独立衍射斑点识别
image_idNo图像 id(来自 dm_datasets),或 "front" 表示前台窗口

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the DC is mean-subtracted and that frequencies/spacings are calibrated, and it warns that d_pix is only a spectral grid radius, not 1/pixel or lattice spacing. However, it does not state whether the operation is read-only, whether it changes image state, or how errors are handled.

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?

The description is two tightly written sentences with no waste. It front-loads the purpose and return contents, then adds a single caveat that directly prevents a common misinterpretation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with rich schema descriptions but no annotations and no output schema, the description does cover the core purpose and some output semantics. It remains incomplete because it does not explain output structure in detail, usage conditions versus siblings, or behavioral traits such as read-only status and error 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 100%, so the schema already documents rect, top_n, and image_id in detail. The description adds no additional parameter-level meaning beyond the caveat about d_pix, which is not one of the input parameters. A baseline 3 is appropriate when the schema carries the parameter documentation.

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 clearly states a specific operation, "二维 FFT", and summarizes what it returns: mean-subtracted DC, spectral grid coordinates, and calibrated spatial frequencies/spacings. It does not distinguish this tool from sibling analysis tools such as dm_2d_analyze or dm_spectrum, so it falls short of the sibling-differentiation bar for a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for 2D FFT analysis but gives no explicit guidance on when to use it instead of alternatives. The d_pix caveat is useful for interpreting output, but it is not a when-to-use rule or an alternative-selection guideline.

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