Skip to main content
Glama

Run T-Test

run_t_test
Read-onlyIdempotent

This is QUESTIONSTAR's built-in, server-side computation on the survey's responses. The same and other statistics (e.g. multivariate/interaction regression, time-series, ANOVA) can be computed from the raw responses returned by list_survey_responses. Computes a PAIRED-samples t-test between exactly two survey variables answered by the same respondents (e.g. a before/after item pair). Variables are addressed by question codes as returned by get_survey: Q1 (whole question), Q3.1 (matrix row), Q2.3 (checkbox option — enters as 0/1). Analyzable: choice questions (options enter by their numeric export code), checkbox options, numeric, slider and sorting questions; free-text cannot be analyzed. Returns descriptive statistics of both samples (mean, stdDev, stdErrMean, min/max, median, variance), n = the number of complete pairs (responses missing either value are excluded), and the test set: meanDiff with its 95% confidence interval (confIntervalLower/Upper), Student's t (studentT), degrees of freedom (df) and the two-sided pValue. When the test cannot be computed, the result's 'error' field explains why. Heavy rate class (600 requests/hour).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSurvey publication code — the 8-character code from the survey's public link (e.g. 1a2b3c4d). Returned by list_surveys.
questionsYesExactly two question codes — the paired samples (e.g. ["Q1","Q2"]).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
errorNo
resultsNo
samplesNo
questionsNo
casesTotalNo
surveyCodeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: declares the rate class (600 requests/hour), explains that non-computable cases return an 'error' field, and discloses the n-counting rule (responses missing either value are excluded). It also spells out the returned statistical set, so the agent knows exactly what evidence comes back.

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?

Front-loads what the tool is, then layers code formats, analyzable question types, and return shape in a logical order with no filler sentences. It is a dense single block, though — the return-value enumeration is long and partly duplicated by the output schema.

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?

Covers everything an agent needs to call it correctly: valid question types, code addressing syntax, pair-completeness semantics, rate limit, and error signaling. Since an output schema exists, the return-value prose is surplus but harmless rather than a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3 would apply, but the description adds real meaning: how variables are addressed (Q1 whole question, Q3.1 matrix row, Q2.3 checkbox entering as 0/1) and that options enter by numeric export code. It also reinforces the exactly-two constraint on the questions array beyond the schema's terse wording.

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?

States a specific verb and precise statistical procedure: 'Computes a PAIRED-samples t-test between exactly two survey variables answered by the same respondents,' with a concrete example (before/after item pair). This clearly separates it from siblings like run_correlation and run_regression, which an agent could otherwise confuse with it.

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?

Gives a clear condition for use (paired samples, same respondents) and an explicit alternative for a different need — 'the same and other statistics ... can be computed from the raw responses returned by list_survey_responses.' It also states a hard exclusion ('free-text cannot be analyzed'). It does not explicitly say when to prefer run_correlation or run_regression over this tool, so it falls short of a full when/when-not/alternatives treatment.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources