Skip to main content
Glama

get_descriptive_stats

Compute descriptive statistics like count, mean, std, min, max for AnnData attributes, with optional filtering and value counts for categorical columns.

Instructions

Provide basic descriptive statistics (e.g., count, mean, std, min, max, etc. or value counts) for an attribute or attribute value of an optionally filtered AnnData object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoThe key of the attribute value to explore. Can be a single string or a list of strings for nested key retrieval (e.g., ['key1', 'key2'] to access attr_obj['key1']['key2']). Should be None for attributes X, obs, and var.
pathYesAbsolute path or URL to the AnnData file (.h5ad or .zarr)
attributeYesThe attribute to describe
filter_valueNoThe value(s) to filter by.
filter_columnNoThe column name of the obs or var dataframe to filter by.
filter_operatorNoThe operator to use for the filter.
columns_or_genesNoThe columns or genes to describe. For pandas.DataFrame attributes (e.g., obs, var), these are column names. For 'X' or 'layers' attributes, these are gene names (from var_names). If None, the entire dataset is considered. Also accepts glob-like patterns as input, e.g. ['RE*', 'CD4*'].
filter_attributeNoThe attribute to filter by. One of 'obs' or 'var' or None for no filtering. Has to be provided TOGETHER with filter_column, filter_operator, and filter_value.
return_value_counts_for_categoricalNoWhether to return the value counts for categorical columns.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorYesAny error message
descriptionYesThe description of the attribute value
value_countsYesThe value counts for the attribute value
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool computes statistics and supports optional filtering, but it does not explicitly state that the operation is read-only, mention performance considerations, or describe any side effects. The nature of the tool makes read-only behavior likely, but this is not explicitly disclosed.

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 a single, concise sentence that front-loads the tool's purpose. It contains no redundant information and every word adds value. This is an exemplar of conciseness.

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

Completeness4/5

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

Given the tool's complexity (9 parameters) and the presence of an output schema, the description is adequately complete. It introduces the core purpose and filtering capability, while the structured schema and output schema handle detailed parameter and return specifications. It could offer more guidance on usage scenarios, but the rich schema compensates.

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?

The input schema provides 100% parameter coverage with detailed descriptions for all 9 parameters. The tool description adds minimal parameter context, such as 'attribute or attribute value' hinting at the key/filter relationships, but the schema already does the heavy lifting, so the baseline of 3 is appropriate.

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 identifies the tool's function: computing basic descriptive statistics for AnnData attributes, optionally filtered. It uses specific verbs and resources, and the distinction from siblings (view_raw_data, get_summary) is evident from the emphasis on statistics rather than raw viewing or summarization.

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 implies usage when descriptive statistics are needed, but it does not explicitly contrast with alternatives like get_summary or view_raw_data, nor does it state exclusions. It provides enough context that the AI can infer the general use case but lacks explicit guidance.

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/biocontext-ai/anndata-mcp'

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