Skip to main content
Glama

roi_stats

Compute descriptive statistics (n_voxels, mean, sd, median, min, max) inside an atlas region or mask file, with explicit exclusion counts.

Instructions

Descriptive statistics inside an atlas region or a mask file.

Returns n_voxels, mean, sd, median, min, max, and an explicit count of every excluded voxel. Report those exclusion counts in your answer — they are not a footnote. There is no inference here: no test, no p-value, no threshold.

Args: volume: Volume to measure. Defaults to the most recently loaded. region_label: Atlas region name. Mutually exclusive with mask_path. mask_path: Path to a binary mask NIfTI. Mutually exclusive with region_label. exclude_zeros: Drop exactly-zero voxels. Off by default; zeros are counted and included, because treating zero as "no data" is an assumption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
volumeNo
mask_pathNo
region_labelNo
exclude_zerosNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it returns specific statistics, emphasizes reporting exclusion counts, states no inference is performed, and details the exclude_zeros parameter implications. This surpasses the need for annotations.

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 concise and well-structured: first line states purpose, then lists return values, followed by parameter details. No unnecessary words, and every sentence adds value.

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?

Given 4 parameters with no output schema, the description covers all necessary aspects: return values, parameter constraints, default behavior, and usage caveats. It is fully complete for an agent to use the tool 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%, so the description must add meaning. It explains volume defaults to the most recently loaded, clarifies mutual exclusivity of region_label and mask_path, and describes exclude_zeros default and rationale. This adds significant value beyond the schema.

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 clearly states the tool returns descriptive statistics (n_voxels, mean, sd, median, min, max) inside an atlas region or mask file. It explicitly distinguishes from sibling tools like compare_volumes by stating no inference is performed.

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?

The description specifies when to use the tool (for descriptive statistics) and what it does not do (no inference). It also explains mutual exclusivity of region_label and mask_path, and notes the default volume. However, it does not explicitly compare to alternative sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AyushXRane/neurochat'

If you have feedback or need assistance with the MCP directory API, please join our Discord server