Skip to main content
Glama

set_filters

Install a stateful online filter chain to apply bandpass and notch filters on a live EEG stream, preventing transients at chunk boundaries and preserving raw signal.

Instructions

Install a stateful online filter chain on a running stream.

The chain filters continuously in the background as samples arrive, carrying filter state across chunk boundaries. This matters: filtering each query window independently would inject a transient at every boundary and corrupt any phase-sensitive measure. Filtered output goes to a second buffer, so raw signal remains available via read_window(filtered=False).

These are causal filters -- there is no zero-phase option, because that needs future samples. Check group_delay_sec in the response to know how far behind real time your filtered features are.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderNoButterworth order for the bandpass. 4 is a sensible default.
filtersNoAdvanced -- an explicit stage list that overrides the arguments above, e.g. [{"kind": "highpass", "low": 0.5}, {"kind": "notch", "low": 60, "quality": 30}]. Kinds: bandpass, bandstop, highpass, lowpass, notch.
notch_freqNoMains frequency to notch out (50 in most of the world, 60 in the Americas). None to skip.
session_idYesThe session to filter.
bandpass_lowNoHigh-pass corner in Hz. None to skip the bandpass.
bandpass_highNoLow-pass corner in Hz. None to skip the bandpass.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses statefulness (filter state carried across chunk boundaries), causal-only limitation, output buffering behavior (raw available via read_window(filtered=False)), and group delay. This is rich behavioral context beyond schema.

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 concise paragraphs, each earning its place: what it does, why statefulness matters, and the causal/phase caveat. No fluff or repetition of schema content. Front-loaded with the core verb+resource statement.

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

Completeness5/5

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

For a stateful filter installation with 100% schema coverage and an output schema, the description is thorough: it covers operational semantics (background, continuous, causal), the buffer/raw-retrieval path, and how to verify output correctness (group_delay_sec). Output schema handles return-value documentation, and the description covers the behavioral gaps.

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 100%, so baseline is 3. The description adds value beyond schema: it explains the causal stateful behavior affecting all filter parameters, warns about boundary transients that corrupt phase-sensitive measures, and explains the group_delay_sec consequence of filters. However, it doesn't elaborate on parameter interplay (e.g., filters override vs the named arguments).

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?

The description states a clear verb+resource: 'Install a stateful online filter chain on a running stream.' It distinguishes from sibling tools like get_band_power/get_psd (analysis reads) and clear_filters (removal), and clarifies it operates on a live stream versus other tools. The scope is specific and unambiguous.

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

Usage Guidelines5/5

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

The description explicitly explains when/when-not to use it: causal filters only, 'no zero-phase option, because that needs future samples.' It clarifies the continuous background filtering vs per-window filtering tradeoff and points to group_delay_sec for latency awareness. This is strong usage guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AImplifier/eeg-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server