Skip to main content
Glama
CCXT MCP Server

CCXT MCP Server

by MyronKoch

analytics_calculate_risk

Calculate Sharpe Ratio, Max Drawdown, and Kelly Criterion from trade history to assess risk and optimize position sizing.

Instructions

Calculate comprehensive risk metrics (Sharpe Ratio, Max Drawdown, Kelly Criterion) from trade history

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "trades": "<trades>"
    },
    "name": "analytics_calculate_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
tradesYesArray of completed trades with profit data

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden, yet it says nothing about behavior beyond the metric names. It does not state the minimum number of trades required, how edge cases such as zero drawdown or zero losing trades are handled, whether it is a pure computation with no side effects, or what the result object looks like. For an unannotated tool this is a significant gap.

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?

A single front-loaded sentence with the verb, the metric list, and the data source, and no filler. The parenthetical enumeration is efficient and every clause earns its place.

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

Completeness3/5

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

With no annotations and no output schema, the description should at least hint at the return shape and input preconditions, and it only partially does so by naming three metrics. An agent knows what it will get in broad terms but not the structure, units, or minimum data requirements, leaving it adequate but incomplete for a computation 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?

Schema coverage is 100% and the single 'trades' parameter is fully documented down to nested profit/profitPercent fields. The description reinforces that the array should come from real trade history, but adds no constraints the schema lacks, such as whether profitPercent is optional or how many trades are needed. Baseline 3 applies when the schema does the heavy lifting.

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 resource ('risk metrics') and enumerates the exact metrics produced: Sharpe Ratio, Max Drawdown, Kelly Criterion. The phrase 'from trade history' also signals its input domain, which separates it from price-series tools like analytics_compare_prices. It does not explicitly distinguish itself from analytics_position_size or indicators_calculate, so it stops short of a 5.

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 explicit when-to-use or when-not-to-use guidance, and no named alternative to route to. The only implicit signal is 'from trade history', which tells the agent that completed trades are the prerequisite input, but it never states a decision rule such as 'use after closing positions' or 'use analytics_position_size for sizing instead'.

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