Skip to main content
Glama

Run Correlation

run_correlation
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 pairwise correlations between survey variables: one matrix per requested method (pearson default; spearman for ordinal/non-normal data; tau = Kendall). 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. Each cell carries the pair's coefficient r (−1…1), its two-sided pValue, fisherZ (Pearson) and n = the number of response pairs used — missing answers are excluded PAIRWISE, so n varies per cell. Uncomputable pairs (e.g. a constant variable) carry an error instead of numbers. 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.
questionsYesAt least two question codes to correlate pairwise (e.g. ["Q1","Q3.1"]).
correlationTypesNoCorrelation methods; omitted = pearson. Any combination — one result matrix per method.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matricesNo
questionsNo
casesTotalNo
surveyCodeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotent/non-destructive, so the bar is low, yet the description adds substantial context: a heavy rate class (600 requests/hour), pairwise exclusion of missing answers so n varies per cell, error cells for uncomputable pairs like constants, and the exact per-cell payload (r, pValue, fisherZ, n). Nothing contradicts the annotations.

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-loaded with the core operation and its scope, and every later clause carries operational detail. It is dense and slightly rambling in the opening sentence about QUESTIONSTAR's built-in computation, but no sentence is purely filler.

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?

Despite an output schema existing, the description still documents the shape and caveats of results, and it covers the inputs, the analyzable-data constraints, the rate limit, and the null/error behavior. An agent has everything needed to invoke it correctly and interpret edge cases.

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 100%, so baseline is 3, but the description meaningfully exceeds the schema by decoding the question-code addressing scheme (Q1 whole question, Q3.1 matrix row, Q2.3 checkbox option entering as 0/1), explaining that choice options enter by numeric export code, and clarifying that correlationTypes accepts any combination yielding one matrix per method.

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+resource ('Computes pairwise correlations between survey variables') and immediately scopes it against siblings, noting the same/other statistics are available via list_survey_responses and that run_regression/run_t_test-style analyses are separate tools. An agent can distinguish it from every sibling without opening a schema.

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 clear selection rules for the method parameter (pearson default, spearman for ordinal/non-normal, tau = Kendall) and an explicit when-not ('free-text cannot be analyzed'), plus a list of analyzable question types. It stops short of an explicit statement of when to prefer this tool over pulling raw responses from list_survey_responses, only alluding to that alternative.

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