Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Risk Parity Weights

workflow.run_risk_parity
Read-only

Risk-parity (equal or custom risk contribution) portfolio weights for N assets: given a covariance matrix (or N return series to compute one from), finds long-only weights where each asset contributes its target share of total portfolio risk. Use when user asks "what weights give each asset equal risk contribution?" or "how do I risk-parity-weight this portfolio?". A portfolio-construction calculation, not a buy/sell recommendation. Returns: weights, risk_contributions (should match risk_budgets exactly at convergence), portfolio_volatility.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returnsNoOne return series per asset (2+ assets, all series the same length). Provide this OR covariance, not both.
covarianceNoDirect NxN covariance matrix, if not supplying returns[][] directly.
risk_budgetsNoTarget risk share per asset, one per asset (need not sum to 1, normalized internally). Default: equal (1/N each).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=false), so the bar is lower. The description adds genuine behavioral context beyond that: it specifies long-only output, an iterative convergence criterion, and the exact return fields including risk_contributions matching risk_budgets.

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?

Front-loaded with the core operation and constraint, followed by usage triggers and the return contract. Dense but each sentence contributes; the parenthetical return-list is compact rather than padded.

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?

No output schema exists, so the description carries the return-value burden and does so by enumerating weights, risk_contributions, and portfolio_volatility. Combined with full parameter coverage and a clear safety profile, an agent has what it needs; only edge-case behavior (non-convergence, asset-count limits) is unstated.

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%, so the schema already documents all three parameters including the returns-or-covariance exclusivity and the internal normalization of risk_budgets. The description restates the covariance/return-series duality but adds no syntax or format detail beyond the schema, making the baseline 3 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?

States a specific verb and resource ('finds long-only weights where each asset contributes its target share of total portfolio risk') and names the domain constraint (risk parity, equal or custom risk contribution). An agent can distinguish this from siblings like run_portfolio_risk or run_kelly_frontier without opening the schema.

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?

Provides explicit trigger phrasing ('what weights give each asset equal risk contribution?') and a clear exclusion ('A portfolio-construction calculation, not a buy/sell recommendation'). It stops short of naming a specific alternative sibling to route to, so it is clear context without full alternative routing.

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.