Skip to main content
Glama

filter_signal

Apply Butterworth lowpass, highpass, bandpass, or bandstop filtering with zero-phase filtfilt to remove noise or isolate frequency bands from signals.

Instructions

Filter a signal with a Butterworth design and zero-phase filtfilt.

``kind`` is lowpass, highpass, bandpass or bandstop. ``cutoff`` is in Hz;
lowpass/highpass take a scalar and bandpass/bandstop take ``[low, high]``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYes
orderNo
cutoffYes
signalYes
sample_rateYes

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?

With no annotations, the description carries the full behavioral burden. It does disclose two real traits beyond the schema: the filter family (Butterworth) and that it is zero-phase (filtfilt, i.e. non-causal, no phase shift) — meaningful for time-series work. However it omits edge/padding behavior, the minimum-length constraint filtfilt imposes, and that the operation is non-mutating.

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?

Two sentences plus a compact parameter block, front-loaded with the operation and method. Every clause carries information; nothing is padding.

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 5-parameter, 4-required tool with no annotations and no output schema, the description covers the two error-prone arguments well but leaves signal's accepted forms, sample_rate's units, and order's effect unspecified. An agent could probably invoke it, but would be guessing on the signal input format and the sampling-rate convention.

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 0%, so the description must compensate and it partially does: it enumerates kind's four values and specifies cutoff's units (Hz) and shape (scalar for lowpass/highpass, [low, high] for bandpass/bandstop) — genuinely useful information no schema field provides. It says nothing about signal (array vs. string, i.e. literal path?), sample_rate's units or relationship to cutoff, or order (default 4).

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 ('Filter a signal') and pins down the algorithm ('Butterworth design and zero-phase filtfilt'), which implicitly separates it from siblings like wavelet_denoise, convolve, stft, and fft_analysis. It stops short of naming any sibling outright, but the method detail is enough for an agent to route correctly.

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 never says when to pick this over wavelet_denoise, convolve, or a spectral method, nor does it state prerequisites or exclusions. The only usage signal is the parameter syntax for kind/cutoff, which is configuration rather than guidance.

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