Skip to main content
Glama

Mne Make Epochs

mne_make_epochs

Segment raw EEG/MEG recordings into time-locked epochs around events, with configurable baseline and artifact rejection.

Instructions

Segment a Raw object into Epochs around events. tmin/tmax in seconds relative to the event; baseline 'default' = (None, 0); event_id like 'target:1,standard:2' to name/select conditions; reject_eeg = peak-to-peak EEG rejection threshold in volts (e.g. 100e-6). Prefer JSON event_id={label: code} and baseline=[start, end] or null; legacy strings remain supported. reject/flat map channel types to SI thresholds; reject={} disables configured rejection. Do not combine reject with reject_eeg. Stored under epochs_name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flatNo
tmaxNo
tminNo
picksNo
rejectNo
detrendNo
baselineNodefault
event_idNo
raw_nameNoraw
reject_eegNo
epochs_nameNoepochs
events_nameNoevents
event_repeatedNoerror
reject_by_annotationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.4.4
    • addedInput schema / properties / baseline / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / baseline / type
      Removed value: -"string"
    • addedInput schema / properties / detrend
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        0,
      +        1
      +      ],
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / event_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": "integer"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / event_id / type
      Removed value: -"string"
    • addedInput schema / properties / event_repeated
      Added value: +{
      +  "default": "error",
      +  "enum": [
      +    "error",
      +    "drop",
      +    "merge"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / flat
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / picks
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "items": {
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / reject
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / reject_by_annotation
      Added value: +{
      +  "default": true,
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are present, so the description carries the full behavioral burden. It discloses time-relative tmin/tmax semantics, default baseline behavior, event_id encoding, SI units for rejection thresholds, the 'reject={} disables configured rejection' behavior, storage under epochs_name, and the warning not to combine reject with reject_eeg. It does not cover event_repeated or reject_by_annotation behavior, but the core side effects are clearly communicated.

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 purpose is stated first, followed by dense, semicolon-packed parameter guidance with no filler or repetition of schema content. Every sentence contributes: units, format preferences, rejection constraints, interaction warnings, and storage behavior.

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 14-parameter MNE tool with no annotations, this description covers the commonly needed parameters and key interactions well, and the presence of an output schema excuses detailed return-value explanations. However, nontrivial parameters with defaults—event_repeated, reject_by_annotation, and detrend—plus pipeline prerequisites such as the need for existing events, are left unexplained. It is adequate for typical calls but not fully complete for an agent facing edge cases.

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%, and the description compensates substantially: tmin/tmax in seconds, reject_eeg in volts with an example, baseline default and preferred array form, event_id as object or legacy string, and reject/flat channel-type mapping. It leaves some parameters like picks, detrend, event_repeated, and reject_by_annotation to inference from names or enums, so it is strong but not exhaustive.

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 opens with a specific construction: 'Segment a Raw object into Epochs around events,' naming the object, operation, and result. This clearly distinguishes it from event-finding, filtering, and averaging siblings without needing to inspect their schemas.

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

Usage Guidelines3/5

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

The role in the pipeline is implied by 'Segment a Raw object into Epochs around events,' and it gives format preferences such as 'Prefer JSON event_id={label: code}' and 'legacy strings remain supported.' However, it never names alternative tools or states when to choose this over siblings like mne_find_events or mne_average_evoked, and prerequisites are left implicit.

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