Skip to main content
Glama

mne_fit_ica

Remove artifacts from EEG/MEG data by fitting ICA on Raw or Epochs. Choose method (FastICA, Infomax, Picard) and component count or variance fraction, then save under a custom ICA name.

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
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It usefully mentions that the result is stored under ica_name, that scikit-learn is required, and that it operates on Raw/Epochs objects. However, it does not disclose whether repeated calls overwrite an existing ICA, whether the original data is mutated, or what the session-state side effects are.

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: the first sentence states the core purpose, and the subsequent sentences deliver essential parameter semantics and dependency information. Every sentence contributes value without repetition or fluff.

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

Completeness4/5

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

Given the presence of an output schema and the moderate complexity of the tool, the description covers the essential context: purpose, prerequisite filtering, parameter choices, storage location, and dependency. It does not outline the typical workflow pipeline (e.g., fitting before apply_ica), but this is not strictly required for correct invocation.

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 description coverage is 0%, so the description must compensate. It does so well for n_components (int, float variance fraction, or null) and method (fastica default, infomax, picard), and clarifies the ica_name default. It does not explain random_state or explicitly define the 'name' parameter, which are minor gaps given the schema's bare structure.

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 is specific and action-oriented: 'Fit Independent Component Analysis on a Raw/Epochs object for artifact removal' clearly identifies the tool's purpose and distinguishes it from siblings like mne_apply_ica (which applies ICA) and mne_plot_ica_components (which visualizes ICA results). It names the exact resource and the intended outcome.

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 context by noting that data should preferably be 1 Hz high-pass filtered and that the tool is meant for artifact removal. It does not mention explicit alternatives or exclusion scenarios, but the context is sufficient for an experienced MNE user to infer when to use it.

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/Exekiel179/MNE-MCP'

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