Skip to main content
Glama

Stat Describe Data

stat_describe_data

Computes descriptive statistics—means, standard deviations, medians, and group sizes—for numeric variables, optionally by group, to report sample characteristics before inference.

Instructions

Descriptive statistics, optionally broken down by group.

Use this to report the sample before any inference: means, SDs, medians and group sizes are expected in every results section.

When to use: immediately after loading, and again when writing up. When NOT to use: as a substitute for checking assumptions — use stat_data_quality_check and stat_assumption_report for that.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "stat_describe_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
dvNoDependent variable (numeric column). If omitted, all numeric columns are described.
nameYesSession dataset name.
groupNoOptional grouping column for a per-group breakdown.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It conveys that the tool is a reporting/summary step with no inferential side effects, but it never states read-only behavior, what happens if the session dataset is absent or unnamed, or how non-numeric or missing data are handled. For a low-risk summarization tool this is adequate but not rich.

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 purpose is front-loaded in one line, then labelled when-to-use and when-NOT-to-use blocks, which is easy to scan. The one soft spot is the editorial aside about what is 'expected in every results section', which is style advice rather than tool-selection information.

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?

The tool is simple, the input schema is fully described, and an output schema exists, so return values need not be restated. The only gap is the implicit dependency on a loaded session dataset, which is hinted at ('immediately after loading') but not stated as a precondition.

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 100%, so dv, name, and group are already fully documented, and the description adds no syntax, format, or edge-case detail beyond them. The mention of group sizes and group breakdown loosely reinforces the `group` parameter but adds nothing the schema does not already say.

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 opening sentence names a specific operation (descriptive statistics) and a specific scoping option (per-group breakdown), and the enumerated statistics (means, SDs, medians, group sizes) make the output concrete. It also distinguishes itself from the assumption-checking siblings by name, so an agent can separate it from stat_assumption_report without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use triggers ('immediately after loading, and again when writing up') and an explicit when-NOT-to-use clause, naming the two sibling tools that should be used instead. The workflow conditions are stated rather than inferred.

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