Skip to main content
Glama

finance_portfolio_stats

Read-only

Portfolio performance and risk stats — Performance and risk analytics from a return or price series: total return, CAGR, annualized mean and volatility, downside deviation, Sharpe, Sortino, Calmar, max drawdown with peak/trough/recovery positions, Ulcer index, historical 95% VaR and CVaR, skewness, kurtosis, best/worst period, % positive periods and a rating. Add benchmark= for beta, Jensen alpha, correlation, R squared, tracking error, information ratio and up/down capture. Params: prices= (levels) or returns= (percent per period; unit=decimal for 0.012 style); period=daily|weekly|monthly|quarterly|yearly (default daily); optional rf= annual risk-free % (default 0), benchmark= same format and length. Offline. Price: $0.003 USDC (Base, via x402).

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": {
      "prices": "<prices>",
      "period": "<period>"
    },
    "name": "finance_portfolio_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodYesmonthly
pricesYes100,102,101,105,103,108,110,107,111,115,112,118,120

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, and the description reinforces this with "Offline" plus a concrete price of $0.003 USDC via x402 on Base, which is genuinely useful cost/payment context. Beyond that it adds little behavioral detail — no notes on input validation failure modes, minimum series length, or what happens when benchmark length mismatches the series.

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 purpose, then the metric list, then the benchmark-only metrics, then a compact Params block, then operational notes. The metric enumeration is long but each item names a distinct output the caller may need, so it is dense rather than padded.

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 must carry the return-value burden and does so by enumerating every computed statistic including drawdown peak/trough/recovery positions. Input modes, units, defaults, optional enhancements, execution locality, and cost are all covered.

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?

Schema coverage is nominally 100% but the schema descriptions are weak (period is described only as "monthly", prices only as a sample CSV string), so the description carries real weight: it defines returns as percent per period, flags unit=decimal for 0.012-style values, gives the full period enum with a daily default, and explains rf= as an annual risk-free percentage. It also describes rf= and benchmark=, which do not appear in the input schema at all — useful, though it means the caller cannot be sure those parameters are accepted.

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 pairing ("Portfolio performance and risk stats") and immediately enumerates the exact analytics produced, from total return through CVaR and Sharpe. An agent can distinguish this from the surrounding finance calculator siblings 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?

Gives clear operating context: supply either a level series via prices= or a per-period series via returns=, with benchmark= only when relative measures are needed. It does not name an alternative tool or state exclusions, so it stops short of full when/when-not 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.

Resources