Skip to main content
Glama

math.fft

Read-onlyIdempotent

Compute the discrete Fourier transform of real-valued sample strings and return each bin's index, magnitude, and phase in radians with float64 precision.

Instructions

실수 샘플의 이산 푸리에 변환(DFT)을 numpy.fft 로 계산한다. samples 는 2개 이상 65536개 이하의 Decimal 문자열 리스트. 각 bin 은 k, magnitude, phase_rad 를 담으며 float64 계산에 유효숫자 12자리이고 1/N 정규화는 하지 않는다. k 는 주파수가 아니라 인덱스이므로 Hz 는 k * 샘플링주파수 / N 으로 직접 계산한다.

Input Schema

NameRequiredDescriptionDefault
samplesYes

Output Schema

NameRequiredDescriptionDefault
nYes
binsYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, so the safety profile is covered; the description goes further and discloses the two conventions most likely to cause a wrong result — no 1/N normalization and 12 significant digits under float64. It does not cover error behavior for out-of-range inputs, but the substantive numeric caveats are present.

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 dense sentences, each earning its place: what it computes, what the input must look like, and how to read the output. The input constraint is front-loaded and nothing is repeated from the schema or annotations.

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?

Covers input format, numeric precision, normalization convention, and output bin fields (k, magnitude, phase_rad) plus the index-vs-frequency caveat. The one gap is that it never states how many bins are returned from an N-point real transform (full N vs one-sided), which matters for interpreting the spectrum.

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 0%, so the description must carry the parameter burden and it largely does: samples is a list of Decimal-formatted strings, real-valued, 2 to 65536 items. Only the exact string format for a Decimal element is left unstated.

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?

States a specific verb and resource: computes the DFT of real-valued samples via numpy.fft. The forward-transform scope inherently separates it from math.ifft, but the sibling is never named explicitly, so differentiation is implicit rather than stated.

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

Usage Guidelines3/5

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

No explicit when-to-use / when-not guidance and no reference to alternatives such as math.ifft. Usage is only implied through the input constraints (2–65536 samples, real-valued only) and the note on converting k to Hz.

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

Deploy Server

Other Tools