Skip to main content
Glama

ForexDemo.com

Forex Slippage Calculator

calculate_slippage
Read-onlyIdempotent

What slippage (the difference between the price asked for and the price filled) costs per trade, per month and over a period. Same calculation as the Forex Slippage Calculator page at https://forexdemo.com/forex-slippage-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": {
      "entry": "<entry>",
      "exit": "<exit>"
    },
    "name": "calculate_slippage"
  }
}

Input Schema

NameRequiredDescriptionDefault
exitYesSlippage on exit per trade, in slippageUnit.
pairNoCurrency pair, such as EUR/USD. EURUSD and eur-usd are accepted too.EUR/USD
rateNoOnly needed when the account currency is not in the pair: the price of the market pair that converts it (for example the GBP/USD price for EUR/GBP in a USD account). Required when currency is not quote.
sizeNoAverage size per trade, in sizeUnit.
entryYesSlippage on entry per trade, in slippageUnit.
monthsNoNumber of months.
tradesNoCompleted trades per month.
currencyNoCurrency to show costs in: quote (the pair's second currency) or another currency.quote
sizeUnitNolots (100,000 units each) or units.lots
stopPipsNoOptional stop distance in pips, to compare the slippage with the risk.
precisionNoOnly for points: fractional when prices have 5 decimals (3 for yen pairs), whole when they have 4 (2 for yen pairs).fractional
slippageUnitNopips or points.pips
averageWinPipsNoOptional average win in pips, to compare the slippage with the average win.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false and openWorldHint=false, so the description is not required to carry the safety profile. It nevertheless adds real behavioral context: missing optional inputs fall back to the page's defaults, and those defaults are echoed back in the response, which tells the agent how to interpret results it did not fully parameterize. Nothing contradicts the annotations.

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?

Two sentences, front-loaded with the outcome (costs per trade/month/period), followed by one sentence covering fidelity to a reference implementation and default behavior. No filler or redundant restatement of the name.

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, read-only calculator with no output schema, the description covers what it returns (three cost horizons) and how omitted inputs are resolved, plus where the numbers come from. The only gap is that the response's shape is described only indirectly as 'costs' and 'defaults listed in the reply'.

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%, including enum value meanings and the note about rate being required when the account currency is not the quote currency, so the baseline is 3. The description adds only the general defaults-on-omission rule, not per-parameter meaning beyond the schema.

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 description names a specific calculation (slippage cost) and states the three output horizons it reports: per trade, per month, and over a period. That is far more precise than a name-restatement, and no sibling calculator (pip, margin, profit, swap) covers slippage cost, so an agent can select it unambiguously.

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?

It gives useful input-handling guidance ('every input is optional unless marked required; left-out inputs use the page's defaults'), but it never states when to reach for this versus related calculators such as calculate_pip or calculate_risk_reward, nor any exclusion condition. Usage is implied by the resource rather than explicitly directed.

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