Skip to main content
Glama

correlation

Compute Pearson, Spearman, or Kendall coefficients and p values from inline data arrays or file references to measure relationships between two variables.

Instructions

Compute the Pearson, Spearman or Kendall correlation coefficient and its p value.

``x`` and ``y`` may be passed inline or as ``"@<path>"`` file references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
methodNopearson

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses that x and y accept an inline array or an '@<path>' file reference, which is real behavioral context, but says nothing about length-matching requirements, handling of ties/missing data, or output format.

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?

Two short sentences, front-loaded with the core purpose, with zero filler. The input-form note is the only additional detail and it earns its place.

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?

For a 3-parameter compute tool with no output schema, the description adequately conveys what is computed (a coefficient and a p value). It omits validation expectations (equal-length inputs) and the return structure, but these are minor for a pure statistical computation.

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 0%, so the description must compensate. It clarifies the dual input form for x and y (inline vs '@<path>'), which the schema does not, and its method list implies the accepted method values. However, it never explicitly maps the three method names to the 'method' parameter or notes the 'pearson' default, leaving a gap.

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 (Compute) and resource (correlation coefficient and its p value) and enumerates the exact supported variants (Pearson, Spearman, Kendall). This clearly distinguishes it from siblings like t_test, anova, and linear_regression.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as linear_regression, and no guidance on which of the three methods to pick or under what conditions. Usage is only implied by the tool's name.

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