Skip to main content
Glama

analyze_risk

Read-onlyIdempotent

Calculate portfolio Value-at-Risk and Conditional VaR from historical asset returns, accounting for cross-asset correlation. Ideal for risk attribution and regulatory capital sizing.

Instructions

[Premium] Compute portfolio Value-at-Risk (VaR) and Conditional VaR (Expected Shortfall) from historical asset return series, accounting for cross-asset correlation. Use for portfolio risk attribution, regulatory capital sizing, drawdown scenario analysis. Returns are matrix [asset][time] of period returns. For simulating outcomes from a parametric distribution rather than historical data, use simulate_montecarlo. Requires ORACLAW_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returnsYes[asset][time] matrix of period returns (e.g. daily). Each row same length.
weightsYesPortfolio weights per asset. Length must equal returns.length. Should sum to 1.
confidenceNoVaR confidence level (default: 0.95).
horizonDaysNoHorizon in days, scales VaR by sqrt(horizon) (default: 1).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
varYesValue-at-Risk at the requested confidence (loss expressed as positive number).
cvarYesConditional VaR (mean loss beyond VaR threshold).
expectedReturnYes
volatilityYes
confidenceNo
horizonDaysNo
assetsNo
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent, open-world. The description adds context: premium feature, requires API key, and explains that it uses historical data and computes VaR/CVaR. No contradictions.

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?

Description is concise: a few sentences front-loaded with purpose, followed by use case, alternative, and requirement. No wasted words.

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?

Given the output schema exists, the description provides sufficient context: input format, use cases, alternative tool, and access requirements. Covers the complexity well.

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 100%, so descriptions exist for all parameters. The overall description clarifies the 'returns' parameter format as matrix and explains horizon scaling. Adds value beyond 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?

The description clearly states the tool computes VaR and CVaR from historical returns, accounting for cross-asset correlation. It lists specific use cases and distinguishes from the sibling tool simulate_montecarlo.

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

Usage Guidelines5/5

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

Explicitly tells when to use (risk attribution, regulatory capital, drawdown analysis) and when not to use (parametric simulations) by naming the alternative. Also notes premium status and API key requirement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Whatsonyourmind/oraclaw'

If you have feedback or need assistance with the MCP directory API, please join our Discord server