Skip to main content
Glama
Ian3738
by Ian3738

survey_correlation

Compute correlations for complex survey data, using replicate weights and plausible-value pooling for accurate standard errors.

Instructions

Correlations for complex survey data, with replicate-weight standard errors and plausible-value pooling. Correlates each column in x against either variables or a plausible-value set.

Give the design one of two ways: replicate_weights (existing columns — either a list of names or a prefix such as 'W_FSTURWT' that matches W_FSTURWT1..80), or jkzone + jkrep so JK2 replicates are built for you (TIMSS/PIRLS ship JKZONE and JKREP). method defaults to JK2 for constructed replicates and Fay for 60+ supplied columns, which is what PISA needs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesColumns to correlate from.
fayNoFay factor when method='fay'.
dataYesDataset name in the session.
jkrepNoJackknife replicate indicator column.
digitsNoDecimal places.
jkzoneNoJackknife zone column.
methodNoReplication method: auto, jk2, jk1, brr or fay.auto
weightYesFinal sampling weight column.
pv_countNoHow many plausible values.
pv_prefixNoPlausible-value prefix, e.g. 'BSMMAT'.
variablesNoColumns to correlate against. Omit when using plausible values.
pv_patternNoPlausible-value pattern with {i}.
replicate_weightsNoReplicate weight columns, or a prefix matching them.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It explains how replicate weights can be supplied as explicit columns or a prefix, how JK2 replicates are constructed from jkzone/jkrep, and how `method` auto-selects. This goes well beyond a minimal definition, though it does not describe output format or error conditions.

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 dense but efficient: it front-loads the tool's purpose, then presents usage alternatives and method defaults without redundant phrasing. Every sentence contributes either to what the tool does or how to invoke it correctly.

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, 13 parameters, and absence of an output schema, the description covers the main invocation paths and critical defaults well. It could be more complete by stating the shape of the return value or what happens when both design paths are supplied, but the schema fills most remaining gaps.

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 the baseline is 3, but the description adds substantial meaning beyond the schema: the list-or-prefix behavior for replicate_weights, the jkzone+jkrep pairing, the automatic method defaults tied to replicate weight counts, and the distinction between `variables` and plausible-value sets.

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 names the specific operation ('Correlates each column in x against either variables or a plausible-value set') and the resource ('complex survey data'), and distinguishes it from the simpler sibling `correlation` by emphasizing replicate-weight standard errors and plausible-value pooling.

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?

It gives clear usage context: complex survey data, two mutually exclusive design specification paths, and method selection defaults (JK2 vs Fay for 60+ supplied columns). It does not explicitly name alternatives like `correlation`, but the survey-specific framing makes the intended use clear.

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

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/Ian3738/r-stats-mcp'

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