Skip to main content
Glama

calculate_portfolio_var

Read-onlyIdempotent

Calculate portfolio Value at Risk (VaR) with historical, parametric, and conditional VaR, plus risk contribution of each holding.

Instructions

計算投資組合的風險值 (Value at Risk),包含歷史 VaR、參數 VaR、條件 VaR (Expected Shortfall),以及各持股的風險貢獻度

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confidenceNo信心水準,0.90 或 0.95 或 0.99,預設 0.95
horizonNo持有期間(天),預設 1
Behavior4/5

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

Annotations already indicate read-only and idempotent. The description adds detail about the computed outputs (VaR types and risk contributions), providing additional behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the primary purpose and enumerates outputs concisely, though it could be structured with bullet points for clarity.

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?

The description explains the return values (VaR metrics and risk contributions) sufficiently given no output schema. It does not mention input prerequisites like portfolio existence, but this is implied by the context.

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 provides full coverage and descriptions for both parameters (confidence level and horizon). The tool description does not add any further parameter semantics, resulting in baseline score.

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 calculates portfolio Value at Risk, listing specific types (historical, parametric, conditional) and risk contribution, effectively distinguishing it from sibling portfolio tools.

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?

The description implies use for risk calculation but does not explicitly state when to use this tool versus alternatives like get_portfolio_performance or get_portfolio_concentration.

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/kevinlin49361128-stack/stock-analyzer-mcp'

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