Skip to main content
Glama

BRAINIAC Portfolio Analytics

Value-at-Risk and Expected Shortfall

portfolio-analytics_var-cvar
Read-onlyIdempotent

Historical, parametric normal and Monte Carlo VaR/ES at caller confidence levels from a return series. Price $0.04 USDC. POST /api/v1/portfolio-analytics/var-cvar. 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>",
      "confidence": "<confidence>"
    },
    "name": "portfolio-analytics_var-cvar"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoseed, integer, from -9007199254740991 to 9007199254740991. Required.
methodsNomethods, array. Required.
returnsYesreturns, array. Required.
confidenceYesconfidence, array. Required.
simulationsNosimulations, integer, from 1000 to 200000. Required.
horizonPeriodsNohorizonPeriods, integer, from 1 to 9007199254740991. Required.
portfolioValueNoportfolioValue, number. Optional.

Output Schema

NameRequiredDescriptionDefault
resultsNoresults. Array.
sourcesNosources. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, open-world behavior, so the description's added value is the pricing and payment gate: $0.04 USDC per call and the fact that an unpaid invocation returns payment terms instead of running. That is genuinely useful behavior beyond the structured fields, though it says nothing about run cost, latency, or limits for Monte Carlo with high simulation counts.

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 short sentences, front-loaded with what is computed, followed by price, endpoint, and the payment-failure behavior. Every sentence carries distinct information and nothing is repeated from the title.

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?

With annotations, a full output schema, and 100% schema coverage, the description supplies everything an agent needs to decide to call and what to expect on payment failure. The only shortfall is the absence of guidance on which sibling risk tool to prefer for overlapping metrics.

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 seven parameters. The description only reinforces two of them (the return-series input and multiple caller confidence levels) and adds no detail on seed determinism, horizon scaling, or how portfolioValue changes the result from a percentage to a dollar figure.

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 computation (Value-at-Risk and Expected Shortfall) with the three estimation methods (historical, parametric normal, Monte Carlo) and the input it operates on (a return series) at caller-specified confidence levels. It is clearly not a generic risk tool, but it never contrasts itself with the closely related sibling portfolio-analytics_risk-metrics, so an agent must infer which one to reach for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

There is no explicit when-to-use-versus-alternatives guidance, and no sibling such as risk-metrics or stress-test is named as a boundary. The one real usage rule given is operational: an unpaid call returns x402 payment terms and does not execute, which tells the agent a call can return without results.

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