Skip to main content
Glama

Mne Compute Connectivity

mne_compute_connectivity
Destructive

Computes bivariate connectivity (coherence, PLV, etc.) across trials from Epochs, with configurable bands, pairs, time windows, and methods, returning an MNE Connectivity object.

Instructions

Bivariate across-trial connectivity with a params JSON object: multiple bands, ordered channel-name pairs, picks, epoch-relative time window, multitaper/fourier/cwt_morlet estimation and smoothing/cycles. Preserves signed, directed and complex values. Stores an MNE Connectivity object; optional first-30-edge heatmap (CWT time mean, complex magnitude only for display). Requires mne-connectivity. Not Granger/PAC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesBivariate connectivity only; multivariate indices have different semantics.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.4

TDQS

A4.2/5.0
Behavior4/5

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

Given destructiveHint=true, the description adds useful context beyond the annotation: it stores an MNE Connectivity object, optionally produces a heatmap, and caveats that the heatmap is display-only with complex magnitude. It does not explicitly state that an existing result with the same name is replaced, but the schema's con_name description covers that behavior.

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: core function first, then parameter landscape, then behavioral and scoping caveats. Every sentence earns its place, including the dependency note ('Requires mne-connectivity') and the Granger/PAC exclusion.

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 high schema coverage and an existing output schema, the description is nearly complete: it captures analysis scope, supported estimators, storage behavior, display caveat, and dependency. A small gap is the lack of an explicit statement that it operates on an existing Epochs object, though the schema's epochs_name parameter supplies that.

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 100%, so the baseline is 3; the description mostly condenses parameter meanings rather than adding new semantics. It helpfully groups parameters into conceptual buckets (bands, pairs, picks, time window, smoothing/cycles), but a knowledgeable agent gains little beyond what the schema already provides.

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 verb and resource ('Bivariate across-trial connectivity') and enumerates the key dimensions: bands, ordered channel-name pairs, picks, time window, estimation methods, and smoothing/cycles. It also states a clear exclusion ('Not Granger/PAC'), which helps distinguish it from other analysis tools.

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 clearly scopes the tool to bivariate across-trial connectivity and explicitly excludes Granger/PAC and multivariate indices ('Bivariate connectivity only; multivariate indices have different semantics'). It does not name alternative sibling tools to route to, so it lacks the explicit when-to-use-vs-alternative guidance required for a 5.

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