Skip to main content
Glama

RiskReward Trading Calculators

Realized trading performance

analyze_trade_performance
Read-onlyIdempotent

Analyze up to 500 chronological closed trades supplied by the user, each with net P&L after costs and original risk. Returns win rate, profit factor, expectancy in currency and R, total net R, and optional closed-trade equity drawdown when initial equity is supplied. Use for reviewing an existing trade sample. No account access, deposits, intratrade drawdown, forecasts, signals, or new risk recommendations.

Input Schema

NameRequiredDescriptionDefault
tradesYesClosed trades ordered chronologically, all using the same currency and risk convention. Maximum 500.
initialEquityNoStarting equity before the ordered trades. Required only for equity drawdown metrics. No deposits or withdrawals are modeled.
quoteCurrencyNoCurrency shared by all monetary inputs. Defaults to USD; no currency conversion is performed.

Output Schema

NameRequiredDescriptionDefault
toolYes
inputsYes
metricsYes
formulasYes
warningsYes
assumptionsYes
reproduceUrlYes
documentationUrlYes
calculationVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false/openWorldHint=false, so the safety profile is covered. The description adds value beyond that: the 500-trade cap, the fact that drawdown is only produced when initialEquity is supplied, and explicit statements about what is not modeled (deposits, intratrade drawdown, no account access). Remaining gap is minor – no note on how missing/invalid rows are handled.

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?

Three tight sentences: purpose+inputs, outputs, then usage and exclusions. The capability statement is front-loaded, and no sentence is filler or redundant with the name/title.

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

Completeness5/5

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

An output schema exists, so return-value documentation is not required, yet the description still summarizes the metrics. With 100% schema coverage, clear annotations, and explicit in/out-of-scope boundaries, an agent has everything needed to decide and invoke correctly.

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 description coverage is 100%, and the schema already documents netPnl, initialRisk (including the 'do not substitute a later stop risk' convention), initialEquity's drawdown-only role, and quoteCurrency's no-conversion default. The description's mention of 'optional closed-trade equity drawdown when initial equity is supplied' largely restates the schema, so the baseline 3 is appropriate.

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?

States a specific verb (Analyze), the exact resource (up to 500 chronological closed trades with net P&L and original risk), and enumerates the computed outputs (win rate, profit factor, expectancy in currency and R, total net R, drawdown). This is fully distinguishable from the sibling calculators (calculate_net_risk_reward, calculate_position_size), which compute per-trade values rather than aggregate sample statistics.

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?

'Use for reviewing an existing trade sample' gives a clear activation context, and the exclusion list (no account access, deposits, intratrade drawdown, forecasts, signals, or new risk recommendations) sharply bounds when NOT to use it. It does not name a sibling alternative, but the tool set is non-overlapping, so the exclusions carry the routing burden effectively.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources