Skip to main content
Glama

BRAINIAC Portfolio Analytics

Volatility, Sharpe, Sortino and drawdown

portfolio-analytics_risk-metrics
Read-onlyIdempotent

Annualised volatility, Sharpe, Sortino, Calmar, max drawdown with peak/trough/recovery indices, skewness and excess kurtosis from a return series. Price $0.03 USDC. POST /api/v1/portfolio-analytics/risk-metrics. 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": {
      "returns": "<returns>"
    },
    "name": "portfolio-analytics_risk-metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
marNomar, number. Optional.
returnsYesreturns, array. Required.
periodsPerYearNoperiodsPerYear, number. Required.
riskFreePerPeriodNoriskFreePerPeriod, value. Required.

Output Schema

NameRequiredDescriptionDefault
calmarNocalmar. Number.
sharpeNosharpe. Number.
sortinoNosortino. Number.
sourcesNosources. Array.
skewnessNoskewness. Number.
volatilityNovolatility. Number.
limitationsNolimitations. Array.
maxDrawdownNomaxDrawdown. Number.
annualReturnNoannualReturn. Number.
recoveryIndexNorecoveryIndex. Number.
excessKurtosisNoexcessKurtosis. Number.
drawdownPeakIndexNodrawdownPeakIndex. Number.
drawdownTroughIndexNodrawdownTroughIndex. Number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful non-schema behavior: a $0.03 USDC charge and the fact that an unpaid call returns x402 payment terms without executing, which prevents an agent from treating an empty result as a computation failure. It does not cover output shape or handling of short/degenerate series, but output schema exists.

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?

Three sentences, zero filler, and the metric list is front-loaded so the agent learns what it gets before reading price and transport details. Each sentence carries distinct information: outputs, cost, endpoint, and payment failure mode.

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?

For a read-only, idempotent analytics endpoint with a full input schema and an output schema, the description covers purpose, cost, transport, and the unpaid-call behavior. Remaining gaps (annualisation semantics, behavior on very short series) are secondary given the structured schemas.

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 the baseline is 3 and the schema is the primary source for all four parameters. The description adds only 'from a return series', giving no extra meaning for mar, periodsPerYear, or riskFreePerPeriod (which accepts either a scalar or an array) beyond the terse schema text.

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?

The description names a specific verb+resource outcome: computes annualised volatility, Sharpe, Sortino, Calmar, max drawdown with peak/trough/recovery indices, skewness and excess kurtosis from a return series. That is concrete enough to distinguish it from siblings like var-cvar or tracking-error-capture by output set, 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 Guidelines2/5

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

It states the input premise ('from a return series') but gives no when-to-use guidance, no exclusions, and no pointer to related tools such as var-cvar or the correlation matrix that an agent might confuse it with. The only operational guidance is the payment condition, which is about billing rather than 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