Skip to main content
Glama

risk_correlation

Read-onlyIdempotent

Compute N×N Pearson correlation and covariance matrices from multiple return series, with eigenvalues for PCA analysis.

Instructions

N x N correlation and covariance matrices from return series.

Use when computing an N×N correlation matrix for multiple assets. Provide a 2D array of return series. Returns: Pearson correlation matrix, covariance matrix, and eigenvalues for PCA analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seriesYesNamed return series, e.g. {"AAPL": [0.01, -0.02, ...], "MSFT": [...]}
Behavior4/5

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

The description adds value beyond annotations by detailing the return values (correlation matrix, covariance matrix, eigenvalues). Annotations already indicate read-only, idempotent, and non-destructive behavior, so no contradiction. The description could mention whether the output is symmetric or includes diagonal, but it is sufficient.

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 three sentences, front-loaded with the core purpose, and contains no redundant or extraneous information. Every sentence adds value.

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 no output schema, the description clearly states the three return components (correlation, covariance, eigenvalues). For a single-parameter tool with well-defined behavior and annotations, the description provides complete context needed for an agent to use it correctly.

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 schema has 100% coverage and includes a detailed description of the 'series' parameter with an example. The description's mention of '2D array of return series' adds minimal extra nuance, as the schema already describes it as an object with array-of-number values. Schema does the heavy lifting, so baseline 3 is appropriate.

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 it computes NxN correlation and covariance matrices from return series, specifying the output includes Pearson correlation, covariance, and eigenvalues for PCA. It distinguishes itself from sibling risk tools like risk_drawdown and risk_kelly by its focus on correlation/covariance matrices.

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 explicitly states when to use the tool: 'Use when computing an N×N correlation matrix for multiple assets.' However, it does not provide explicit when-not-to-use guidance or mention alternative tools for related but distinct tasks (e.g., covariance only or PCA only).

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

Install Server

Other Tools

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/QuantOracledev/quantoracle'

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