Skip to main content
Glama
vosesoftware

ModelRisk MCP

Official
by vosesoftware

compute_correlation_matrix

Computes Spearman correlation matrix from historical data and returns its nearest valid positive-semidefinite form. Use this to generate correlation inputs for copula models in Excel.

Instructions

ModelRisk: Compute the rank-order (Spearman) correlation matrix of a data range via VoseCorrMatrix, and its nearest valid (positive-semidefinite) form via VoseValidCorrmat. Use this to turn historical data into the correlation matrix you feed to create_copula for correlated inputs. Variables are columns by default (set data_in_rows=True if each row is a variable). Read-only: runs on a transient scratch sheet that is always deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetYesSheet holding the data.
workbookYesWorkbook file name.
data_rangeYesA1-style range of the data, e.g. 'A1:D200'.
data_in_rowsNoTrue if each variable is a row. Default: columns.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matrixYesSpearman rank-order correlation matrix (VoseCorrMatrix).
is_validYesTrue if the matrix is already a valid (PSD) correlation matrix.
data_rangeYes
variable_countYes
nearest_valid_matrixNoNearest valid matrix (VoseValidCorrmat) — null when already valid.
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it is read-only, runs on a transient scratch sheet that is always deleted, and performs two operations (compute matrix and validate it). This gives the agent complete understanding of side effects.

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 two sentences, each earning its place: the first defines the core function, the second provides usage context and a behavioral note. No redundant or missing information.

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?

Given the tool's complexity (correlation matrix computation and validation), the description covers purpose, usage, parameter behavior, and side effects. The presence of an output schema ensures the return format is documented, making the description complete for invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All parameters are described in the schema (100% coverage). The description adds value by explaining the default for data_in_rows (columns) and giving an A1-style example for data_range. However, the meaning of the output (two matrices) is not detailed in the description, but since an output schema exists, the agent can infer it.

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 states it computes a Spearman correlation matrix and its nearest valid form, explicitly naming the underlying functions (VoseCorrMatrix, VoseValidCorrmat) and linking it to the downstream tool create_copula. This clearly differentiates it from siblings like get_correlation_matrix or fit_copula_to_data.

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 says 'Use this to turn historical data into the correlation matrix you feed to create_copula for correlated inputs,' providing clear when-to-use guidance. It also notes the data_in_rows option. However, it does not describe when not to use the tool or mention alternatives.

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/vosesoftware/modelrisk-mcp'

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