Skip to main content
Glama

BRAINIAC Portfolio Analytics

Correlation and Ledoit-Wolf covariance

portfolio-analytics_correlation-matrix
Read-onlyIdempotent

Pearson and Spearman correlation, optional covariance, rolling windows and Ledoit-Wolf shrinkage covariance from caller series. Price $0.03 USDC. POST /api/v1/portfolio-analytics/correlation-matrix. An unpaid call returns the x402 payment terms and does not run.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "series": "<series>"
    },
    "name": "portfolio-analytics_correlation-matrix"
  }
}

Input Schema

NameRequiredDescriptionDefault
seriesYesseries, object. Required.
methodsNomethods, array. Required.
missingNomissing, string, one of pairwise, listwise. Required.pairwise
rollingWindowNorollingWindow, value. Optional.

Output Schema

NameRequiredDescriptionDefault
psdNopsd. Boolean.
pearsonNopearson. Array.
sourcesNosources. Array.
spearmanNospearman. Array.
ledoitWolfNoledoitWolf. Object.
pairCountsNopairCounts. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, and the description adds genuinely non-obvious behavior: a $0.03 USDC price, the POST endpoint, and that an unpaid call returns x402 payment terms without running the computation. It stops short of describing output shape or limits on series count, but the payment gate is the critical operational detail.

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?

Four short sentences, capability first, then price, endpoint, and payment failure mode—well front-loaded with no filler. The raw endpoint path is arguably redundant given the tool name but is cheap and useful for HTTP callers.

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?

With an output schema present, annotations covering safety hints, and full schema description coverage, the description only needs to supply what structured fields cannot: the paid, x402-gated invocation model. That it does precisely, so an agent can call it correctly on the first attempt.

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 coverage is 100%, so defaults, enums (pearson, spearman, ledoit_wolf, covariance) and the pairwise/listwise choice are already documented. The description adds only marginal meaning by flagging covariance as optional and mentioning rolling windows; it says nothing about semantics of rollingWindow (e.g. minimum length) beyond what the schema carries.

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?

States a specific verb+resource: Pearson/Spearman correlation plus optional Ledoit-Wolf shrinkage covariance computed 'from caller series', and names the optional rolling-window mode. That is enough to separate it from siblings like risk-metrics or var-covar, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

Usage is implied by the method list rather than explained; there is no guidance on when to pick this over risk-metrics or factor-regression, nor on when pairwise vs listwise missing handling or a rolling window is appropriate. The only explicit conditional is the unpaid-call case, which is about billing, not tool selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources