Skip to main content
Glama
IBKR MCP Server

IBKR MCP Server

calculate_var

Compute portfolio Value at Risk over a chosen time horizon and confidence level to assess potential losses and support risk-based decisions.

Instructions

Calculate Value at Risk for the portfolio.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_var"
  }
}

Input Schema

NameRequiredDescriptionDefault
time_horizonNo
confidence_levelNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden and largely drops it. For a VaR calculation the method matters enormously (historical vs. variance-covariance vs. Monte Carlo), as does the lookback window and which holdings define 'the portfolio' — none of that is disclosed. It also does not say whether the result is a currency amount or a percentage, though the output schema may cover the return shape.

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

Conciseness3/5

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

A single short sentence with no wasted words, but also no structure and no front-loaded qualifiers — it is concise by virtue of being under-specified rather than well-edited.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, zero parameter description coverage, and a NaR metric whose method and portfolio scope are undefined, the definition is not complete enough for an agent to call it confidently. The existing output schema relieves it of explaining return values, but the input and computation semantics remain unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and adds nothing: no units for time_horizon (days? trading days?) and no clarification of what confidence_level means in the output. The parameter names are largely self-explanatory, which keeps this above the minimum, but no real meaning is added.

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?

States a specific verb ('Calculate') and a specific, well-defined resource ('Value at Risk for the portfolio'). It is not a tautology, but it does nothing to separate itself from close siblings such as check_risk_limits or calculate_slippage, which an agent may reasonably confuse with a portfolio risk metric.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus check_risk_limits, calculate_position_size, or calculate_slippage, and no stated prerequisites (e.g., positions must be loaded, market data availability). The agent must infer usage entirely from the name.

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