Skip to main content
Glama

Mne Filter

mne_filter

Filter Raw, Epochs, or Evoked data with band-pass, high-pass, low-pass, or notch settings, optionally restricting to specific channels via picks.

Instructions

Band-pass / high-pass / low-pass and/or notch filter a Raw/Epochs/Evoked object in place. l_freq=high-pass edge, h_freq=low-pass edge (either may be null), notch=line-noise frequency (e.g. 50 or 60). picks optional ('eeg', 'meg', or null).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoraw
notchNo
picksNo
h_freqNo
l_freqNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.4
    • addedInput schema / properties / picks / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "items": {
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / picks / type
      Removed value: -"string"
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It discloses the in-place mutation, which is important. It also explains parameter semantics (l_freq/h_freq edges, notch frequency, picks). However, it does not mention potential side effects like data being modified irreversibly, or what happens if both l_freq and h_freq are null (likely no-op). It also does not clarify default behavior for picks when null. These gaps reduce transparency.

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 a single, dense sentence that leads with the core purpose and then explains the key parameters. Every word contributes value; there is no fluff or redundancy. It is concise and well-structured.

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?

The description is adequate for a straightforward filter operation, but it lacks critical details like the interaction between l_freq and h_freq (e.g., both null), the effect of notch, and the default picks behavior. It also does not mention any prerequisites (e.g., data must be loaded) or error conditions. Given that an output schema exists, return values are not needed, but the incomplete parameter semantics leave some ambiguity.

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 coverage is 0%, so the description must compensate. It explains four of the five parameters: l_freq, h_freq, notch, and picks, but omits the 'name' parameter entirely. It also does not clarify the default behavior of null for notch or picks beyond saying picks is optional. While it covers most parameters, the missing 'name' is a notable 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?

The description clearly states the tool filters Raw/Epochs/Evoked objects with specific filter types (band-pass, high-pass, low-pass, notch) and that it operates in place. This is a precise verb+resource combination that distinguishes it from other MNE tools like resample or crop.

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

Usage Guidelines4/5

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

It implies when to use it (for frequency filtering) but does not explicitly mention alternatives or exclusion criteria. The context of sibling tools makes the purpose clear, but it lacks guidance like 'use mne_resample for temporal resampling' or 'use mne_notch_filter for notch-only'. Still, it gives enough context for an agent to select it appropriately.

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