Skip to main content
Glama

spearman_correlation

Read-onlyIdempotent

Measures monotonic association between paired variables using rank-based Spearman rho, detecting relationships without assuming linearity or being distorted by outliers.

Instructions

Test for a monotonic association between two paired variables, via the Pearson correlation of their ranks -- doesn't assume linearity and is far less sensitive to outliers' exact magnitude than pearson_correlation. Same return shape as pearson_correlation (statistic is rho itself, in [-1, 1]).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesfirst variable, one value per observation
yYessecond variable, same length and pairing order as x
alphaNosignificance level for the test (and any confidence interval); default 0.05

Schema Changelog

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

  1. Addedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already indicate read-only and idempotent behavior, and the description adds that the statistic is rho in the range [-1, 1]. It also mentions the return shape matches Pearson correlation, which gives some insight into output structure, though it doesn't fully specify all returned fields (e.g., p-value).

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 concise, consisting of two sentences that efficiently convey the core functionality, key differences from Pearson, and output characteristics. No redundant or verbose language is present.

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

Completeness3/5

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

While the description mentions the statistic and its range, it relies on referencing Pearson correlation for the full return shape, which may not be clear if the agent lacks that context. It does not explicitly state that a p-value is returned or how the alpha parameter influences the output, leaving some ambiguity for a complex statistical test.

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 already provides clear descriptions for all parameters (x, y, alpha) with full coverage. The description does not add significant meaning beyond what is already in the schema; it reiterates that variables are paired, which is implied by the schema. Thus, the description adds little to parameter understanding.

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 states that the tool tests for a monotonic association between two paired variables, explicitly mentioning it uses Pearson correlation on ranks (Spearman). It also distinguishes itself from Pearson correlation by noting it doesn't assume linearity and is less sensitive to outliers, making its purpose unambiguous.

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?

The description provides guidance on when to use this test over Pearson correlation by highlighting its advantages for monotonic relationships and outlier robustness. However, it doesn't elaborate on alternatives like Wilcoxon or other non-parametric tests, so the guidance is good but not exhaustive.

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/mrnh/rigor'

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