Skip to main content
Glama

ForexDemo.com

Win Rate Calculator

calculate_win_rate
Read-onlyIdempotent

Win rate from the number of winning and losing trades, how sure that win rate is, and, with the average win and loss, the break-even win rate, profit factor and expectancy. Same calculation as the Win Rate Calculator page at https://forexdemo.com/win-rate-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

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": {
      "wins": "<wins>",
      "losses": "<losses>"
    },
    "name": "calculate_win_rate"
  }
}

Input Schema

NameRequiredDescriptionDefault
costNoOptional cost per trade (spread and commission), in money.
flatNoOptional number of break-even trades.
winsYesNumber of winning trades.
lossesYesNumber of losing trades.
targetNoOptional win rate to reach, in percent. Give 2 for 2%.
averageWinNoOptional average win, in money.
averageLossNoOptional average loss, in money, without a minus sign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so safety needs no restating. The description adds genuine behavioral context beyond that: omitted inputs fall back to page defaults and those defaults are echoed in the reply, which is useful for interpreting mixed explicit/default results.

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?

Two sentences, front-loaded with what is computed and followed by the default-handling rule. The URL reference earns its place by pinning exact formula fidelity, though the sentence is dense enough to require a second read.

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?

With no output schema, the description carries the burden of describing returns and does so by naming the four computed metrics plus the echoed defaults. It stops short of stating the response shape or units for each returned value, which leaves a small gap for a calculator with seven inputs.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds a rule the schema lacks: every input except the two required ones is optional and resolves to a documented default echoed back in the response. It also implies the extended metrics only materialize when averageWin and averageLoss are supplied, which helps an agent decide which optional parameters to pass.

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 opening sentence names a specific verb and resource ('win rate from the number of winning and losing trades') and enumerates the derived outputs (confidence, break-even win rate, profit factor, expectancy). That level of metric specificity cleanly separates it from siblings such as calculate_kelly and calculate_risk_reward without needing to name them.

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 is implied rather than stated: an agent can infer it should call this when it has trade counts and wants win-rate statistics. The description never says when not to use it or which sibling to prefer for an adjacent calculation, and no prerequisites are given beyond required wins/losses.

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