Skip to main content
Glama

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

Portfolio Tearsheet

workflow.run_portfolio_tearsheet
Read-only

Core risk/return tearsheet from a single return series: annualized return (compounded, not linear) and volatility, Sharpe (plain + Lo 2002-corrected + Pezier-White skew/kurtosis-adjusted), Sortino, max drawdown, Calmar ratio, the drawdown-ratio cluster (Ulcer Index/Martin ratio, Pain Index/Pain ratio, Burke ratio + modified), Omega-Sharpe ratio, Upside Potential Ratio, skewness, kurtosis, Probabilistic Sharpe Ratio, win rate, best/worst single-period return. Edge cases: at least 3 returns; periods_per_year 1 to 100,000,000 (default 365); mar (minimum acceptable return per period) and benchmark_sharpe default 0; a series with no drawdown makes Calmar an error, a series with no period below mar makes Sortino an error, and a flat series is an error. Not covered: a benchmark return series (alpha, beta, tracking error), fees, taxes, leverage and intraperiod drawdown. Use when user asks for a full risk summary/report on a strategy or portfolio's returns, not just one metric. Returns all of the above in one call. Returns are decimals (0.02 is 2%), at least 3 periods; the call returns an error when the series never draws down (Calmar undefined) or no period falls below mar (Sortino undefined).

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": {
      "returns": "<returns>"
    },
    "name": "workflow.run_portfolio_tearsheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
marNoMinimum acceptable return for the Sortino ratio, same periodicity as returns (default 0)
returnsYesReturn series, one value per period
benchmark_sharpeNoBenchmark Sharpe ratio for the PSR figure, same periodicity as returns (default 0)
periods_per_yearNoPeriods per year for annualization (default 365). Any number from 1 to 100 million, e.g. 365.25.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / periods_per_year / description
      Previous value: -"Periods per year for annualization (default 365)"New value: +"Periods per year for annualization (default 365). Any number from 1 to 100 million, e.g. 365.25."
    • addedInput schema / properties / periods_per_year / maximum
      Added value: +100000000
    • addedInput schema / properties / periods_per_year / minimum
      Added value: +1
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnly/non-destructive annotations by disclosing failure modes the caller must anticipate: an error when the series never draws down (Calmar undefined), when no period falls below mar (Sortino undefined), and for a flat series. It also states the minimum series length and that outputs are decimal returns, which are genuinely actionable behavioral facts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the metric inventory is informative, but the definition is a dense run-on that repeats itself: the three-error edge cases and the "at least 3 returns" constraint appear in both the middle paragraph and the closing sentence, and periods_per_year's range duplicates the schema.

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 no output schema, the description carries the burden of describing the return payload and does so by enumerating every metric in the result. Combined with the input constraints and documented error conditions, an agent has everything needed to call this 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?

Schema coverage is 100%, so all four parameters are already documented with defaults and ranges. The description restates mar as a per-period minimum acceptable return and benchmark_sharpe as feeding PSR, but adds no syntax, units, or trade-off guidance beyond the schema.

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?

Names a specific artifact (a full risk/return tearsheet) built from a specific input (a single return series) and enumerates the exact metrics produced, including variants like Lo 2002-corrected and Pezier-White-adjusted Sharpe. An agent can separate this from narrower siblings such as run_sharpe_stats or run_var_cvar purely from the description.

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?

Gives explicit when-to-use guidance ("full risk summary/report on a strategy or portfolio's returns, not just one metric") plus clear scope exclusions (no benchmark series, fees, taxes, leverage, intraperiod drawdown). It stops short of naming the sibling tools an agent should pick for single-metric or benchmark-relative needs, leaving that routing to inference.

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.