{"at":"2026-11-22T23:47:35.338Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:47:38.295Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"ephys-mcp","version":""}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"Read-only analysis of intracortical (spike-level) brain-computer-interface recordings. Start with list_sources, then open_session, then inspect with get_session_info. Tools return summaries rather than raw samples. Research and education software. Not a medical device, not for clinical use, and not affiliated with or endorsed by any implant manufacturer.","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-22T23:47:38.295Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:47:38.296Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"ephys-mcp","version":""}},"cacheScope":"private","resultType":"complete","tools":[{"description":"List the data source types this server can open, with their parameters and status.","inputSchema":{"properties":{},"title":"list_sourcesArguments","type":"object"},"name":"list_sources"},{"description":"Open a recording session and return its session_id and metadata.\n\n`params` overrides the source's default_params (see list_sources).\n","inputSchema":{"properties":{"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Params"},"source":{"default":"synthetic","title":"Source","type":"string"}},"title":"open_sessionArguments","type":"object"},"name":"open_session"},{"description":"Close a session and drop any decoder fitted on it.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"close_sessionArguments","type":"object"},"name":"close_session"},{"description":"Metadata for a session: duration, channels, sampling rates, behaviour signals, licence, citation.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_session_infoArguments","type":"object"},"name":"get_session_info"},{"description":"Noise level, SNR and dead/noisy channels from a broadband snippet (max 10 s).","inputSchema":{"properties":{"duration_s":{"default":2.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"get_signal_qualityArguments","type":"object"},"name":"get_signal_quality"},{"description":"Threshold-crossing spike detection on a broadband snippet (max 10 s).\n\nWhere the session has ground-truth spikes, precision and recall are reported.\n","inputSchema":{"properties":{"duration_s":{"default":2.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"},"threshold_sigma":{"default":-4.5,"title":"Threshold Sigma","type":"number"}},"required":["session_id"],"title":"detect_spikesArguments","type":"object"},"name":"detect_spikes"},{"description":"Tell the server where the recording's contacts are, for sessions whose file does not say.\n\nNamed layouts: 'utah' (square grid, e.g. 96 contacts at 400 um), 'grid' with n_columns,\n'linear' (one column at pitch_um, e.g. a laminar probe), 'tetrode_linear' (groups of four).\n'explicit' takes positions_um as [[x, y], ...] in channel order. Geometry is used by\nsort_spikes and plot_probe. Contacts under 100 um apart are sorted jointly.\n","inputSchema":{"properties":{"layout":{"default":"utah","enum":["linear","grid","utah","tetrode_linear","explicit"],"title":"Layout","type":"string"},"n_columns":{"default":0,"title":"N Columns","type":"integer"},"pitch_um":{"default":400.0,"title":"Pitch Um","type":"number"},"positions_um":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"default":null,"title":"Positions Um"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"set_probe_geometryArguments","type":"object"},"name":"set_probe_geometry"},{"description":"Contact geometry and brain-area labels per channel, where known. Use the `channel`\nindices with the `units` argument of get_psth / fit_latent_factors to analyse one area.","inputSchema":{"properties":{"max_rows":{"default":256,"title":"Max Rows","type":"integer"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_probeArguments","type":"object"},"name":"get_probe"},{"description":"Figure: the array map, each contact coloured by its firing rate over a window, with area\nlabels and sorted units marked when a sort has been run. Needs geometry from the file or\nset_probe_geometry.","inputSchema":{"properties":{"duration_s":{"default":30.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"plot_probeArguments","type":"object"},"name":"plot_probe"},{"description":"Spike-sort a broadband window (needs the sort extra). Afterwards the session's spike times\nare the sorted units, restricted to that window, so rates, PSTHs, rasters and decoders use them.\n\nUses the session's probe geometry (from the file or set_probe_geometry) so nearby contacts\nare sorted jointly; without geometry each channel is treated as an independent electrode.\nSorting takes seconds to a few minutes depending on duration and channel count.\n","inputSchema":{"properties":{"channels":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Channels"},"duration_s":{"default":60.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"sorter":{"default":"spykingcircus2","enum":["spykingcircus2","tridesclous2"],"title":"Sorter","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"sort_spikesArguments","type":"object"},"name":"sort_spikes"},{"description":"Population firing-rate summary over a time range (defaults to the whole session).","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"},"t1":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"T1"}},"required":["session_id"],"title":"get_firing_ratesArguments","type":"object"},"name":"get_firing_rates"},{"description":"Fit a decoder from spike counts to a behaviour signal and score it on held-out data.\n\nThe first `train_fraction` of the session trains; the remainder tests. With no\n`target`, the first velocity-like behaviour signal is used. Unrecorded gaps are skipped.\n`mask` names a boolean behaviour signal (such as FALCON's eval_mask); only bins where it\nis true are used for fitting and scoring.\n","inputSchema":{"properties":{"bin_s":{"default":0.05,"title":"Bin S","type":"number"},"kind":{"default":"kalman","enum":["ridge","kalman"],"title":"Kind","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mask"},"session_id":{"title":"Session Id","type":"string"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Target"},"train_fraction":{"default":0.8,"title":"Train Fraction","type":"number"}},"required":["session_id"],"title":"fit_decoderArguments","type":"object"},"name":"fit_decoder"},{"description":"Fit a decoder on one session and score it, unchanged, on other sessions: the question\nbenchmarks such as FALCON ask (does a decoder survive to a later day?).\n\nAll sessions must be open and share the same units/channels. `mask` names a boolean\nbehaviour signal restricting which bins are scored (FALCON files carry `eval_mask`; pass\nnull when the sessions have none). Also reports same-session held-out R² for comparison.\n","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"kind":{"default":"ridge","enum":["ridge","kalman"],"title":"Kind","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"eval_mask","title":"Mask"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Target"},"test_session_ids":{"items":{"type":"string"},"title":"Test Session Ids","type":"array"},"train_session_id":{"title":"Train Session Id","type":"string"}},"required":["train_session_id","test_session_ids"],"title":"evaluate_cross_sessionArguments","type":"object"},"name":"evaluate_cross_session"},{"description":"Decode a window with the fitted decoder; returns a downsampled decoded-vs-true preview.","inputSchema":{"properties":{"duration_s":{"default":2.0,"title":"Duration S","type":"number"},"max_points":{"default":20,"title":"Max Points","type":"integer"},"session_id":{"title":"Session Id","type":"string"},"t0":{"title":"T0","type":"number"}},"required":["session_id","t0"],"title":"decode_windowArguments","type":"object"},"name":"decode_window"},{"description":"Peri-stimulus time histogram: firing aligned to a trial event and averaged over trials.\n\n`event` is one of the session's event_columns (default: movement onset if present).\n`group_by` splits trials by one of its group_columns, e.g. reach direction.\n`units` restricts the analysis to some units; tuning that cancels in the population\naverage (such as direction preference) only shows up per unit. Unit numbers in the\nresult index into `units` when it is given.\nReturns the population time course, its peak, and the units that change most.\n","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Event"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Group By"},"session_id":{"title":"Session Id","type":"string"},"t_after":{"default":0.6,"title":"T After","type":"number"},"t_before":{"default":0.3,"title":"T Before","type":"number"},"units":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Units"}},"required":["session_id"],"title":"get_psthArguments","type":"object"},"name":"get_psth"},{"description":"Fit low-dimensional latent factors to trial-aligned population activity.\n\nGPFA (Yu et al. 2009) gives denoised single-trial trajectories and a timescale per factor;\nPCA is the fast, noisier baseline. Look for an elbow in variance_explained_per_factor to\njudge dimensionality. If the session has a velocity-like signal, reports how well the top\nfactors explain it. Then plot_latent_factors draws the trajectories.\n","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Event"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Group By"},"method":{"default":"gpfa","enum":["gpfa","pca"],"title":"Method","type":"string"},"n_factors":{"default":6,"title":"N Factors","type":"integer"},"session_id":{"title":"Session Id","type":"string"},"t_after":{"default":0.6,"title":"T After","type":"number"},"t_before":{"default":0.3,"title":"T Before","type":"number"},"units":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Units"}},"required":["session_id"],"title":"fit_latent_factorsArguments","type":"object"},"name":"fit_latent_factors"},{"description":"Figure: the top three latent factors over time (single trials thin, group means bold), the\ntrajectory in the plane of the first two factors, and variance explained per factor.\nRequires fit_latent_factors first.","inputSchema":{"properties":{"max_trials_drawn":{"default":40,"title":"Max Trials Drawn","type":"integer"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"plot_latent_factorsArguments","type":"object"},"name":"plot_latent_factors"},{"description":"Figure: population PSTH per group (mean ± SEM over trials) above a unit-by-time heatmap of\nchange from baseline. Same arguments as get_psth. Returns the PNG path and the image.","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Event"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Group By"},"session_id":{"title":"Session Id","type":"string"},"t_after":{"default":0.6,"title":"T After","type":"number"},"t_before":{"default":0.3,"title":"T Before","type":"number"},"units":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Units"}},"required":["session_id"],"title":"plot_psthArguments","type":"object"},"name":"plot_psth"},{"description":"Figure: spike raster for a time window (max 60 s), with unrecorded spans shaded.","inputSchema":{"properties":{"duration_s":{"default":10.0,"title":"Duration S","type":"number"},"max_units":{"default":150,"title":"Max Units","type":"integer"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"plot_rasterArguments","type":"object"},"name":"plot_raster"},{"description":"Figure: decoded against actual behaviour for a window (max 60 s), one panel per dimension.\nRequires fit_decoder first. Pick a window in the test split for an honest picture.","inputSchema":{"properties":{"duration_s":{"default":10.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"title":"T0","type":"number"}},"required":["session_id","t0"],"title":"plot_decodingArguments","type":"object"},"name":"plot_decoding"},{"description":"Lab Streaming Layer streams visible on the local network (needs the lsl extra).","inputSchema":{"properties":{"wait_s":{"default":3.0,"title":"Wait S","type":"number"}},"title":"list_lsl_streamsArguments","type":"object"},"name":"list_lsl_streams"},{"description":"For a live session: how much signal is buffered, whether data is still arriving, and drops.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_stream_statusArguments","type":"object"},"name":"get_stream_status"},{"description":"Search the DANDI Archive for datasets. An empty query returns a short curated list of\nintracortical datasets that work well with this server.","inputSchema":{"properties":{"limit":{"default":10,"title":"Limit","type":"integer"},"query":{"default":"","title":"Query","type":"string"}},"title":"search_datasetsArguments","type":"object"},"name":"search_datasets"},{"description":"Licence, citation and NWB files of a DANDI dataset. Pass a file's path to open_session(source='dandi').","inputSchema":{"properties":{"dandiset_id":{"title":"Dandiset Id","type":"string"},"limit":{"default":50,"title":"Limit","type":"integer"},"version":{"default":"","title":"Version","type":"string"}},"required":["dandiset_id"],"title":"list_dataset_filesArguments","type":"object"},"name":"list_dataset_files"}],"ttlMs":0}}}
{"at":"2026-11-22T23:47:38.697Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-22T23:47:41.632Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"Read-only analysis of intracortical (spike-level) brain-computer-interface recordings. Start with list_sources, then open_session, then inspect with get_session_info. Tools return summaries rather than raw samples. Research and education software. Not a medical device, not for clinical use, and not affiliated with or endorsed by any implant manufacturer.","protocolVersion":"2025-11-25","serverInfo":{"name":"ephys-mcp","version":""}}}}
{"at":"2026-11-22T23:47:41.632Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-22T23:47:41.632Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-22T23:47:41.633Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"List the data source types this server can open, with their parameters and status.","inputSchema":{"properties":{},"title":"list_sourcesArguments","type":"object"},"name":"list_sources"},{"description":"Open a recording session and return its session_id and metadata.\n\n`params` overrides the source's default_params (see list_sources).\n","inputSchema":{"properties":{"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Params"},"source":{"default":"synthetic","title":"Source","type":"string"}},"title":"open_sessionArguments","type":"object"},"name":"open_session"},{"description":"Close a session and drop any decoder fitted on it.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"close_sessionArguments","type":"object"},"name":"close_session"},{"description":"Metadata for a session: duration, channels, sampling rates, behaviour signals, licence, citation.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_session_infoArguments","type":"object"},"name":"get_session_info"},{"description":"Noise level, SNR and dead/noisy channels from a broadband snippet (max 10 s).","inputSchema":{"properties":{"duration_s":{"default":2.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"get_signal_qualityArguments","type":"object"},"name":"get_signal_quality"},{"description":"Threshold-crossing spike detection on a broadband snippet (max 10 s).\n\nWhere the session has ground-truth spikes, precision and recall are reported.\n","inputSchema":{"properties":{"duration_s":{"default":2.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"},"threshold_sigma":{"default":-4.5,"title":"Threshold Sigma","type":"number"}},"required":["session_id"],"title":"detect_spikesArguments","type":"object"},"name":"detect_spikes"},{"description":"Tell the server where the recording's contacts are, for sessions whose file does not say.\n\nNamed layouts: 'utah' (square grid, e.g. 96 contacts at 400 um), 'grid' with n_columns,\n'linear' (one column at pitch_um, e.g. a laminar probe), 'tetrode_linear' (groups of four).\n'explicit' takes positions_um as [[x, y], ...] in channel order. Geometry is used by\nsort_spikes and plot_probe. Contacts under 100 um apart are sorted jointly.\n","inputSchema":{"properties":{"layout":{"default":"utah","enum":["linear","grid","utah","tetrode_linear","explicit"],"title":"Layout","type":"string"},"n_columns":{"default":0,"title":"N Columns","type":"integer"},"pitch_um":{"default":400.0,"title":"Pitch Um","type":"number"},"positions_um":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"default":null,"title":"Positions Um"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"set_probe_geometryArguments","type":"object"},"name":"set_probe_geometry"},{"description":"Contact geometry and brain-area labels per channel, where known. Use the `channel`\nindices with the `units` argument of get_psth / fit_latent_factors to analyse one area.","inputSchema":{"properties":{"max_rows":{"default":256,"title":"Max Rows","type":"integer"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_probeArguments","type":"object"},"name":"get_probe"},{"description":"Figure: the array map, each contact coloured by its firing rate over a window, with area\nlabels and sorted units marked when a sort has been run. Needs geometry from the file or\nset_probe_geometry.","inputSchema":{"properties":{"duration_s":{"default":30.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"plot_probeArguments","type":"object"},"name":"plot_probe"},{"description":"Spike-sort a broadband window (needs the sort extra). Afterwards the session's spike times\nare the sorted units, restricted to that window, so rates, PSTHs, rasters and decoders use them.\n\nUses the session's probe geometry (from the file or set_probe_geometry) so nearby contacts\nare sorted jointly; without geometry each channel is treated as an independent electrode.\nSorting takes seconds to a few minutes depending on duration and channel count.\n","inputSchema":{"properties":{"channels":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Channels"},"duration_s":{"default":60.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"sorter":{"default":"spykingcircus2","enum":["spykingcircus2","tridesclous2"],"title":"Sorter","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"sort_spikesArguments","type":"object"},"name":"sort_spikes"},{"description":"Population firing-rate summary over a time range (defaults to the whole session).","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"},"t1":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"T1"}},"required":["session_id"],"title":"get_firing_ratesArguments","type":"object"},"name":"get_firing_rates"},{"description":"Fit a decoder from spike counts to a behaviour signal and score it on held-out data.\n\nThe first `train_fraction` of the session trains; the remainder tests. With no\n`target`, the first velocity-like behaviour signal is used. Unrecorded gaps are skipped.\n`mask` names a boolean behaviour signal (such as FALCON's eval_mask); only bins where it\nis true are used for fitting and scoring.\n","inputSchema":{"properties":{"bin_s":{"default":0.05,"title":"Bin S","type":"number"},"kind":{"default":"kalman","enum":["ridge","kalman"],"title":"Kind","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mask"},"session_id":{"title":"Session Id","type":"string"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Target"},"train_fraction":{"default":0.8,"title":"Train Fraction","type":"number"}},"required":["session_id"],"title":"fit_decoderArguments","type":"object"},"name":"fit_decoder"},{"description":"Fit a decoder on one session and score it, unchanged, on other sessions: the question\nbenchmarks such as FALCON ask (does a decoder survive to a later day?).\n\nAll sessions must be open and share the same units/channels. `mask` names a boolean\nbehaviour signal restricting which bins are scored (FALCON files carry `eval_mask`; pass\nnull when the sessions have none). Also reports same-session held-out R² for comparison.\n","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"kind":{"default":"ridge","enum":["ridge","kalman"],"title":"Kind","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"eval_mask","title":"Mask"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Target"},"test_session_ids":{"items":{"type":"string"},"title":"Test Session Ids","type":"array"},"train_session_id":{"title":"Train Session Id","type":"string"}},"required":["train_session_id","test_session_ids"],"title":"evaluate_cross_sessionArguments","type":"object"},"name":"evaluate_cross_session"},{"description":"Decode a window with the fitted decoder; returns a downsampled decoded-vs-true preview.","inputSchema":{"properties":{"duration_s":{"default":2.0,"title":"Duration S","type":"number"},"max_points":{"default":20,"title":"Max Points","type":"integer"},"session_id":{"title":"Session Id","type":"string"},"t0":{"title":"T0","type":"number"}},"required":["session_id","t0"],"title":"decode_windowArguments","type":"object"},"name":"decode_window"},{"description":"Peri-stimulus time histogram: firing aligned to a trial event and averaged over trials.\n\n`event` is one of the session's event_columns (default: movement onset if present).\n`group_by` splits trials by one of its group_columns, e.g. reach direction.\n`units` restricts the analysis to some units; tuning that cancels in the population\naverage (such as direction preference) only shows up per unit. Unit numbers in the\nresult index into `units` when it is given.\nReturns the population time course, its peak, and the units that change most.\n","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Event"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Group By"},"session_id":{"title":"Session Id","type":"string"},"t_after":{"default":0.6,"title":"T After","type":"number"},"t_before":{"default":0.3,"title":"T Before","type":"number"},"units":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Units"}},"required":["session_id"],"title":"get_psthArguments","type":"object"},"name":"get_psth"},{"description":"Fit low-dimensional latent factors to trial-aligned population activity.\n\nGPFA (Yu et al. 2009) gives denoised single-trial trajectories and a timescale per factor;\nPCA is the fast, noisier baseline. Look for an elbow in variance_explained_per_factor to\njudge dimensionality. If the session has a velocity-like signal, reports how well the top\nfactors explain it. Then plot_latent_factors draws the trajectories.\n","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Event"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Group By"},"method":{"default":"gpfa","enum":["gpfa","pca"],"title":"Method","type":"string"},"n_factors":{"default":6,"title":"N Factors","type":"integer"},"session_id":{"title":"Session Id","type":"string"},"t_after":{"default":0.6,"title":"T After","type":"number"},"t_before":{"default":0.3,"title":"T Before","type":"number"},"units":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Units"}},"required":["session_id"],"title":"fit_latent_factorsArguments","type":"object"},"name":"fit_latent_factors"},{"description":"Figure: the top three latent factors over time (single trials thin, group means bold), the\ntrajectory in the plane of the first two factors, and variance explained per factor.\nRequires fit_latent_factors first.","inputSchema":{"properties":{"max_trials_drawn":{"default":40,"title":"Max Trials Drawn","type":"integer"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"plot_latent_factorsArguments","type":"object"},"name":"plot_latent_factors"},{"description":"Figure: population PSTH per group (mean ± SEM over trials) above a unit-by-time heatmap of\nchange from baseline. Same arguments as get_psth. Returns the PNG path and the image.","inputSchema":{"properties":{"bin_s":{"default":0.02,"title":"Bin S","type":"number"},"event":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Event"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Group By"},"session_id":{"title":"Session Id","type":"string"},"t_after":{"default":0.6,"title":"T After","type":"number"},"t_before":{"default":0.3,"title":"T Before","type":"number"},"units":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"title":"Units"}},"required":["session_id"],"title":"plot_psthArguments","type":"object"},"name":"plot_psth"},{"description":"Figure: spike raster for a time window (max 60 s), with unrecorded spans shaded.","inputSchema":{"properties":{"duration_s":{"default":10.0,"title":"Duration S","type":"number"},"max_units":{"default":150,"title":"Max Units","type":"integer"},"session_id":{"title":"Session Id","type":"string"},"t0":{"default":0.0,"title":"T0","type":"number"}},"required":["session_id"],"title":"plot_rasterArguments","type":"object"},"name":"plot_raster"},{"description":"Figure: decoded against actual behaviour for a window (max 60 s), one panel per dimension.\nRequires fit_decoder first. Pick a window in the test split for an honest picture.","inputSchema":{"properties":{"duration_s":{"default":10.0,"title":"Duration S","type":"number"},"session_id":{"title":"Session Id","type":"string"},"t0":{"title":"T0","type":"number"}},"required":["session_id","t0"],"title":"plot_decodingArguments","type":"object"},"name":"plot_decoding"},{"description":"Lab Streaming Layer streams visible on the local network (needs the lsl extra).","inputSchema":{"properties":{"wait_s":{"default":3.0,"title":"Wait S","type":"number"}},"title":"list_lsl_streamsArguments","type":"object"},"name":"list_lsl_streams"},{"description":"For a live session: how much signal is buffered, whether data is still arriving, and drops.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_stream_statusArguments","type":"object"},"name":"get_stream_status"},{"description":"Search the DANDI Archive for datasets. An empty query returns a short curated list of\nintracortical datasets that work well with this server.","inputSchema":{"properties":{"limit":{"default":10,"title":"Limit","type":"integer"},"query":{"default":"","title":"Query","type":"string"}},"title":"search_datasetsArguments","type":"object"},"name":"search_datasets"},{"description":"Licence, citation and NWB files of a DANDI dataset. Pass a file's path to open_session(source='dandi').","inputSchema":{"properties":{"dandiset_id":{"title":"Dandiset Id","type":"string"},"limit":{"default":50,"title":"Limit","type":"integer"},"version":{"default":"","title":"Version","type":"string"}},"required":["dandiset_id"],"title":"list_dataset_filesArguments","type":"object"},"name":"list_dataset_files"}]}}}
