Skip to main content
Glama

ForexDemo.com

Risk Reward Calculator

calculate_risk_reward
Read-onlyIdempotent

Risk-reward ratio of a trade from its entry, stop-loss and take-profit, the win rate at which trades of that shape break even, and the likely result over many trades. Same calculation as the Risk Reward Calculator page at https://forexdemo.com/risk-reward-calculator.html. Every input is optional unless marked required; left-out inputs use the page's defaults, which are listed in the reply.

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_risk_reward"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoprices: give entry, stop and target prices. distance: give stopDistance and targetDistance.prices
pairNoPair, used for pip size in prices mode. EURUSD and eur-usd are accepted too.EUR/USD
stopNoStop-loss price (mode prices).
entryNoEntry price (mode prices). Leave all three prices out to use the example trade.
spreadNoOptional spread, in pips (prices mode) or the distance unit.
targetNoTake-profit price (mode prices).
tradesNoNumber of trades for the result over many trades.
winRateNoWin rate in percent, for the result over many trades. Give 2 for 2%.
currencyNoThe currency the trading account is held in.USD
riskAmountNoOptional amount risked per trade, in the account currency.
distanceUnitNoUnit of the distances (mode distance).pips
stopDistanceNoStop-loss distance (mode distance).
targetDistanceNoTake-profit distance (mode distance).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this as a read-only, idempotent, closed-world, non-destructive calculation, so the safety profile is fully covered without prose. The description does add real context beyond that: omitted inputs fall back to the web page's documented defaults and those defaults are echoed in the reply, making the result reproducible against a named reference. It does not describe error behavior or output shape in any depth.

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 outputs are front-loaded in the first sentence and the page-reference sentence is compact and useful for verification. The final sentence about optional inputs and defaults largely repeats what the schema already shows, which is a minor redundancy but not bloat given the tool's breadth.

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?

For a 13-parameter, all-optional calculator with full schema coverage and no output schema, the description does the important work: it enumerates what comes back (ratio, break-even win rate, multi-trade result) and explains that defaults are surfaced in the reply. The remaining gap is that the reply's units/format (currency, pips, the many-trades breakdown) are only implied by the parameters.

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 every parameter, including all four enums and the defaults, is already documented in the schema, so the description is not required to carry parameter meaning. The description adds only a general optionality statement ('every input is optional unless marked required'), which the schema already conveys through zero required fields and explicit defaults — baseline 3 applies.

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?

The description names three concrete outputs — the risk-reward ratio derived from entry/stop/target, the break-even win rate for that trade shape, and a multi-trade expectation — which is a specific verb+resource statement rather than a restatement of the title. It implicitly separates 'break-even win rate' from the sibling calculate_win_rate, but never explicitly routes the agent away from any sibling.

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?

Usage context is implied by the computation itself and by the reference to the matching web page, and the schema's mode enum explains the two input styles. However, there is no explicit statement of when to pick this tool over calculate_win_rate or calculate_position_size, nor any note on prerequisites or when-not to use it.

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