Skip to main content
Glama

fit_decoder

Fit a decoder from spike counts to a behavioral signal and score it on held-out data to assess neural decoding performance.

Instructions

Fit a decoder from spike counts to a behaviour signal and score it on held-out data.

The first `train_fraction` of the session trains; the remainder tests. With no
`target`, the first velocity-like behaviour signal is used. Unrecorded gaps are skipped.
`mask` names a boolean behaviour signal (such as FALCON's eval_mask); only bins where it
is true are used for fitting and scoring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNokalman
maskNo
bin_sNo
targetNo
session_idYes
train_fractionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.7/5.0
Behavior4/5

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

There are no annotations, so the description carries the full burden of behavioral disclosure. It does this well by revealing key non-obvious behaviors: the train/test split, default target selection ('first velocity-like behaviour signal'), skipping of unrecorded gaps, and mask filtering. It does not mention the exact scoring metric or whether any state persists, but the disclosed behavior goes well beyond a generic 'fit decoder' statement.

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 short, dense, and front-loaded, with each sentence adding a distinct behavioral detail: split, default target, gap handling, and mask semantics. There is no filler or repetition of schema fields.

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?

Given no output schema and no annotations, the description should explain the return or score format; it only says 'score it on held-out data' without specifying what is returned. It also omits kind selection guidance and bin_s semantics. It is complete enough for basic invocation but not fully self-sufficient for an agent choosing among siblings or interpreting results.

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 0%, and the description compensates for target, mask, and train_fraction by explaining their semantics. However, it leaves kind (ridge vs kalman), bin_s, and session_id without added meaning, and bin_s in particular could affect how spike counts are assembled. The description adds value but does not fully cover a six-parameter tool with no schema descriptions.

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 opens with a specific verb and resource: 'Fit a decoder from spike counts to a behaviour signal and score it on held-out data.' This makes the tool's core purpose clear and distinct from plotting or firing-rate tools. It does not explicitly name or contrast sibling tools such as evaluate_cross_session or decode_window, so it stops short of full sibling differentiation.

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 clear operational context: training on the first train_fraction and testing on the remainder, with target and mask fallback behavior. However, it never states when to prefer this tool over evaluate_cross_session, decode_window, or other siblings, nor does it give when-not-to-use guidance. The intended use is implied rather than explicit.

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