Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

correlation_coefficient

Calculates the Pearson correlation between two numeric lists to measure their linear relationship and returns the coefficient.

Instructions

Computes the Pearson correlation coefficient between two lists of numbers.

Args: data_x: The first list of numerical values. data_y: The second list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> correlation_coefficient([1, 2, 3], [4, 5, 6]) {'result': 1.0}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_xYes
data_yYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the return shape ({"result": ...} vs {"error": ...}) plus a worked example. It omits important behavioral facts for this operation: whether the two lists must be equal length, what happens on mismatched lengths or zero-variance input, and whether the computation is pure/side-effect free. Partial disclosure merits a middle score.

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?

The purpose sentence is front-loaded and the Args/Returns/Examples structure is easy to scan, with a concrete example that removes ambiguity. The Args section is nearly redundant with the schema, so a little trimming is possible, but nothing is bloated.

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?

There is no output schema, but the description covers the return contract for both success and error, plus a concrete example, which is what an agent needs to interpret results. The main gap is the absence of input-validation behavior (length mismatch, constant series) for a two-param tool with zero annotation coverage.

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 labels data_x as "the first list" and data_y as "the second list," which conveys pairing/order but not the key constraint (equal length) that determines success or error. It adds only marginal meaning beyond the schema's array-of-number types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and statistic ("Computes the Pearson correlation coefficient") and the exact inputs ("two lists of numbers"), so the purpose is unambiguous. It does not distinguish itself from statistical siblings such as linear_regression or variance, but the operation is clearly scoped.

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?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives among the many statistical siblings (linear_regression, variance, mean). The agent must infer applicability purely from the statistic's name.

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