Skip to main content
Glama
78degrees

QuantRisk-MCP-Server

by 78degrees

analyze_risk

Assess portfolio risk exposure by calculating VaR, CVaR, volatility, beta, and maximum drawdown.

Instructions

Calculate core risk metrics for a portfolio — Value at Risk (VaR), Conditional VaR (CVaR), volatility, beta, and max drawdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
positionsYesArray of portfolio positions. Each entry needs a ticker and quantity. Free tier: max 20 positions. Paid tier: up to 500.
confidence_levelNoVaR confidence level as a decimal, e.g. 0.95 = 95%. Range: 0.01-0.99. Default: 0.95.
horizon_daysNoRisk horizon in trading days. 1 = overnight, 21 ≈ 1 month, 252 ≈ 1 year. Default: 1.
methodNoVaR calculation method. "historical" uses empirical return distribution, "parametric" assumes normality, "cornish_fisher" adjusts for skew and kurtosis. Default: "historical".historical
benchmarkNoBenchmark ticker for beta calculation, e.g. SPY or QQQ. Default: SPY.SPY
lookback_daysNoNumber of historical trading days to use. 252 ≈ 1 year, 756 ≈ 3 years. Range: 30-1260. Default: 252.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It lists the output metrics but fails to describe key behavioral traits such as how calculations are performed, whether it makes external API calls, or if there are data freshness requirements. The description adds minimal beyond the input schema.

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 a single, efficient sentence that immediately states the tool's purpose and lists key outputs. There is no extraneous information, and it is well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, 1 required, no output schema), the description is minimal. It adequately states the calculated metrics but does not explain the return format, constraints (e.g., max positions), or provide any operational context beyond the schema. It meets a basic standard but could be improved for agent decision-making.

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 100%, meaning all six parameters are fully described in the schema. The tool description itself does not mention any parameters or add value beyond what the schema already provides. Baseline score of 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 the tool calculates core risk metrics for a portfolio and names specific metrics (VaR, CVaR, volatility, beta, max drawdown). This distinctively separates it from sibling tools like calculate_greeks or stress_test.

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?

The description does not provide any guidance on when to use this tool versus alternatives. It lacks explicit context on prerequisites, such as needing the portfolio positions or data, and does not mention situations where other sibling tools might be more appropriate.

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