Skip to main content
Glama

Mne Fit Ica

mne_fit_ica

Remove artifacts from EEG/MEG data by fitting Independent Component Analysis on Raw or Epochs objects, with configurable components and methods to separate noise from neural signals.

Instructions

Fit Independent Component Analysis on a (preferably 1 Hz high-pass filtered) Raw/Epochs object for artifact removal. n_components can be an int, a float (variance fraction), or null. method: 'fastica' (default), 'infomax', 'picard'. Stored under ica_name (default 'ica'). Requires scikit-learn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoraw
methodNo
ica_nameNoica
n_componentsNo
random_stateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does well: it discloses the supported methods, the varying n_components semantics, where the result is stored (ica_name), and the scikit-learn dependency. It does not mention side effects or the role of random_state, but the key behavioral details 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?

The description is compact and front-loaded: purpose first, then parameter semantics, then storage and dependency. Every sentence contributes useful information without redundancy or filler.

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 covers the core operational requirements: preprocessing, methods, n_components options, storage name, and dependency. However, it omits the meaning of the 'name' parameter and 'random_state', which are not documented elsewhere given 0% schema coverage, leaving an agent to guess at important invocation details.

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. It explains method values and defaults, n_components types, and ica_name default, but it does not explain the 'name' parameter (default 'raw') or 'random_state'. This is adequate but incomplete for the 5-parameter schema.

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 specific verb and resource: 'Fit Independent Component Analysis on a Raw/Epochs object for artifact removal.' This clearly distinguishes it from sibling tools like mne_plot_ica_components or mne_apply_ica, which operate on already-fit ICA results.

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?

The description provides clear usage context: fit ICA for artifact removal, preferably on a 1 Hz high-pass filtered Raw/Epochs object. It does not explicitly name alternatives or exclusion conditions, but the purpose and preprocessing prerequisite are directly stated.

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