Skip to main content
Glama

stft

Compute a short-time Fourier transform from a signal and sample rate to return a magnitude spectrogram, saving the matrix or rendering a PNG when needed.

Instructions

Compute a short-time Fourier transform and return the magnitude spectrogram.

The full magnitude matrix is saved as .npz when it exceeds 100 x 100 cells.
``save_spectrogram`` additionally renders a PNG with matplotlib (Agg).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signalYes
windowNohann
npersegNo
filenameNo
noverlapNo
sample_rateYes
save_spectrogramNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations, so the description carries full burden. It does disclose a non-obvious behavior: the full magnitude matrix is saved as .npz when it exceeds 100x100 cells, and save_spectrogram adds a PNG render. But it omits permission needs, return format (spectrogram in response?), and what happens under the threshold.

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?

Two short sentences, front-loaded with the core action and followed by the side-effect detail. Efficient.

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?

A 7-parameter tool with no output schema and 0% param coverage needs more. The description covers the primary return and a saving side-effect, but leaves most parameters and the response shape unexplained.

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

Parameters2/5

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

Schema description coverage is 0% – all 7 parameters are undocumented. The description only implicitly references save_spectrogram; it says nothing about signal, sample_rate, window, nperseg, noverlap, or filename semantics. Fails to compensate for the coverage gap.

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: 'Compute a short-time Fourier transform and return the magnitude spectrogram.' Clear and distinguishable from siblings like fft_analysis and wavelet_transform.

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?

No guidance on when to use this vs fft_analysis or wavelet_transform, no prerequisites, no mention of the relationship to power_spectrum. The agent must infer usage from the name.

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