Skip to main content
Glama

show_risk

Calculate portfolio risk metrics from snapshot history: annualized volatility, max drawdown, Sharpe ratio, Sortino ratio, win rate, and beta vs benchmark. Requires at least 10 daily snapshots.

Instructions

Portfolio risk metrics derived from snapshot history: annualized volatility, max drawdown, Sharpe ratio, Sortino ratio, win rate, and beta vs benchmark. Requires at least 10 daily snapshots — if the user has fewer, suggest running firma add snapshot regularly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoStart date YYYY-MM-DD
toNoEnd date YYYY-MM-DD (default: today)
benchmarkNoTicker for beta calculation (default: SPY)
risk_free_rateNoAnnual risk-free rate % for Sharpe/Sortino (default: 5.0)
Behavior3/5

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

The description lists the computed metrics and the data requirement, but does not disclose error handling, time to compute, or behavior with invalid parameters. Since no annotations are provided, the description partially carries the burden but misses some behavioral details.

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?

The description is very concise: two sentences front-loading the core function, then adding a key usage condition. No wasted words.

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?

Given the lack of output schema, the description covers the purpose, input conditions, and output metrics. However, it omits details on output format and potential error scenarios, which would make it more complete for a compute tool.

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?

The input schema covers all parameters with descriptions (100% coverage), so the baseline is 3. The description adds no extra parameter semantics beyond listing metrics, meaning it does not enhance understanding of parameters like 'benchmark' or 'risk_free_rate'.

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 specifies that this tool computes and shows portfolio risk metrics, listing specific metrics like volatility, drawdown, and ratios. It distinguishes itself from sibling tools (e.g., show_balance, show_benchmark) by focusing on risk.

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?

The description provides a critical precondition (at least 10 daily snapshots) and suggests an alternative action if the precondition is not met. However, it does not explicitly guide when to use this tool over other related tools like show_portfolio.

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/evan-moon/firma'

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