Skip to main content
Glama

show_risk

Assess portfolio risk by computing annualized volatility, max drawdown, Sharpe ratio, Sortino ratio, win rate, and beta versus a benchmark using daily snapshot history. Requires 10 or more 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)
Behavior4/5

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

With no annotations, the description takes full responsibility. It lists the output metrics, discloses the data requirement, and hints at the method (from snapshot history). It lacks details on error handling or output format, but is reasonably transparent.

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 two sentences, concise and front-loaded with the most critical information: what the tool does and its prerequisite. Every sentence adds value without redundancy.

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 4 parameters, no output schema, and the complexity of risk metrics, the description provides a good overview. It covers the inputs' role but could be improved by describing the output structure or handling edge cases like insufficient data.

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 baseline is 3. The description adds context about the minimum snapshot requirement and explains the use of benchmark and risk_free_rate in calculations, enhancing meaning beyond the schema alone.

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 identifies the tool as computing portfolio risk metrics (volatility, drawdown, Sharpe, Sortino, win rate, beta) and distinguishes it from sibling tools like show_balance or show_benchmark by focusing specifically 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 explicitly states a prerequisite (at least 10 daily snapshots) and advises an alternative action (suggest running `firma add snapshot`), providing clear guidance on when and how to use the tool.

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