Skip to main content
Glama

get_psth

Calculate peri-stimulus time histograms to align neural firing to trial events and average across trials, revealing population time course, peak, and most responsive units.

Instructions

Peri-stimulus time histogram: firing aligned to a trial event and averaged over trials.

`event` is one of the session's event_columns (default: movement onset if present).
`group_by` splits trials by one of its group_columns, e.g. reach direction.
`units` restricts the analysis to some units; tuning that cancels in the population
average (such as direction preference) only shows up per unit. Unit numbers in the
result index into `units` when it is given.
Returns the population time course, its peak, and the units that change most.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bin_sNo
eventNo
unitsNo
t_afterNo
group_byNo
t_beforeNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses meaningful non-obvious behaviors: the default `event` is movement onset, `units` restricts analysis and result unit numbers index into the supplied list, and the return includes the population time course, its peak, and the units that change most. This is strong behavioral disclosure for a read-only analysis tool; nothing contradicts annotations.

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?

The description is compact and front-loaded: it defines the term first, then explains the key parameters, then states the return contents. It is slightly dense, but every sentence adds information and there is no filler or repetition of schema defaults.

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 tool with 7 parameters, no annotations, and no output schema, the description covers the central analytical concepts and return contents well. However, it omits explanations of the time-window parameters (`t_before`, `t_after`, `bin_s`) and gives only a high-level summary of the output, leaving some room for misinterpretation despite the self-explanatory parameter names.

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?

Since schema description coverage is 0%, the description must compensate, and it does for the most non-obvious parameters: `event` refers to session event columns, `group_by` uses session group columns, and `units` has special indexing behavior. However, `bin_s`, `t_before`, `t_after`, and `session_id` receive no semantic explanation beyond their names and defaults, so a substantial portion of the parameters remains underdescribed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies a specific operation: computing a peri-stimulus time histogram of firing aligned to a trial event and averaged over trials. It also indicates what is returned (population time course, peak, most-changing units), which helps separate computation from plotting siblings like plot_psth. It could more explicitly distinguish itself from get_firing_rates, but the core purpose is unambiguous.

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 description gives useful parameter guidance, such as how `event`, `group_by`, and `units` affect the analysis, and why per-unit analysis matters when population tuning cancels out. However, it never explicitly tells an agent when to choose this tool over alternatives like plot_psth or get_firing_rates, so selection guidance is only implicit.

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