Skip to main content
Glama
FEAGI MCP Server

FEAGI MCP Server

Official
by feagi

analyze_run

Read-only

Compute spike-timing, ring-period, and phase-window metrics from a spikes CSV, returning compact JSON for acceptance checks and neural run validation.

Instructions

Acceptance metrics from a spikes CSV, as compact JSON (never rows).

For Trainer-owned time windows (seconds from attempt_start), falls, and stored neuron state (leak_coefficient, membrane_potential) use get_run_window_stats (Studio MCP) instead; this tool covers spike-timing, ring-period and phase-window metrics only.

csv_path is a Trainer run's neural/spikes.csv (the dir from list_run_data; columns burst,area,x,y,z) or a record_spikes csv_path (burst,area_id,area_name,x,y,z,memory_neuron_id). Areas are named as in the file. A phase area's phase at a burst is the z bins it fires in; while silent, the last phase is carried forward. Metrics (each optional):

  • ring: {area, anchor_bin=0, bins?} period in bursts between entries into anchor_bin (period_mean, period_sd, cycles) and bins_visited.

  • port_in_window: list of {port, phase_area, bins, lag=0}: pct_inside of the port's spikes whose phase lag bursts earlier is in bins (a list, or "3..7").

  • window_counts: list of {area, phase_area, bins, lag=0}: the area's spikes in and out of the phase window (e.g. resets in/out of window).

  • duty: {area, phase_area, bins, half_bins?} fire fraction and silent episodes (off_episodes) per half-cycle of the phase area (lower half of 0..bins-1 unless half_bins is given).

Args: csv_path: Spikes CSV file ring: Ring period request port_in_window: Port-versus-phase-window requests window_counts: Spikes-in/out-of-window requests duty: Duty / off-episode request first_burst: Ignore bursts before this one last_burst: Ignore bursts after this one

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "csv_path": "<csv_path>"
    },
    "name": "analyze_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
dutyNo
ringNo
csv_pathYes
last_burstNo
first_burstNo
window_countsNo
port_in_windowNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.14

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered, yet the description adds real conduct details: output is compact JSON and never raw rows, areas are named exactly as in the file, and a silent phase area carries its last phase forward. That carry-forward rule materially affects how results should be read. It does not say whether metrics compose in a single call or how empty/missing metrics are reported, so it is not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is long, but the length is justified by 0% schema coverage and seven parameters with free-form nested objects. The structure is front-loaded: return shape and sibling disambiguation come first, then the input file contract, then a bulleted per-metric breakdown, then the arg list. The trailing Args block partially repeats the bullets, which is the one redundant element.

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

Completeness5/5

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

Despite an output schema existing, the description still characterizes result shapes per metric (period_mean, period_sd, cycles, bins_visited, pct_inside, off_episodes), which is helpful rather than duplicative for nested/untyped payloads. Combined with the file-format contract, the alternative tool, and full parameter semantics, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the nested objects are untyped ('additionalProperties: true'), so the description carries the entire burden and does so: csv_path is identified by its source (list_run_data dir or record_spikes) and column layouts, ring is broken into area/anchor_bin/bins with its outputs named, port_in_window and window_counts describe port/area/phase_area/bins/lag including the '3..7' range form, and duty explains half_bins. first_burst and last_burst are defined as burst-range filters. This is meaning well beyond anything the schema 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 opening sentence names the operation and the resource precisely (acceptance metrics computed from a spikes CSV, returned as compact JSON, never rows), and the description then enumerates the four metric families (ring, port_in_window, window_counts, duty) it can produce. It also explicitly names what it is not by pointing to get_run_window_stats for Trainer-owned windows, falls, and neuron state, so an agent can separate the two tools without opening a schema.

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?

Usage is routed explicitly: for Trainer-owned time windows, falls, and stored neuron state, use get_run_window_stats instead, with the covered scope stated as spike-timing, ring-period and phase-window metrics. That is a clear alternative and exclusion. It stops short of telling the agent how to choose among the four metric options or what happens when several are requested together, which keeps it from a 5.

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

Deploy Server

Other Tools