Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Forex Scenario

workflow.run_forex_scenario
Read-only

PnL across a range of hypothetical price moves (in pips, signed by actual price direction, not pre-adjusted for side), for a single forex position size, long or short. Precious-metal pairs (XAU, XAG, XPT, XPD) are refused with an error, because their pip and lot size differ by broker. Edge cases: entryPrice and units above zero; deltasPips is a list of at least one signed number of pips (positive means the price rose, whatever the side); a move that takes the exit price to zero or below is not rejected, read exitPrice; The pair is BASE/QUOTE with two different ISO 4217 currency codes, in any letter case; crypto tickers and precious metals (XAU, XAG, XPT, XPD) are refused. A pip is 0.01 for a pair quoted in JPY and 0.0001 for every other pair, and a standard lot is 100,000 units. Not covered: spread, commission, swap, slippage and account-currency conversion. Use when user asks "what if price moves X pips in either direction?". Returns: scenarios[] (deltaPips, exitPrice, pnlQuote).

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": {
      "pair": "<pair>",
      "side": "<side>",
      "entryPrice": "<entryPrice>",
      "units": "<units>",
      "deltasPips": "<deltasPips>"
    },
    "name": "workflow.run_forex_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesCurrency pair in BASE/QUOTE format, e.g. "EUR/USD"
sideYesTrade direction: "long" or "short"
unitsYesPosition size in base-currency units
deltasPipsYesHypothetical price moves in pips, e.g. [-50, 0, 50]
entryPriceYesEntry price in the pair's own quote terms, e.g. 1.0850 for EUR/USD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / entryPrice / description
      Added value: +"Entry price in the pair's own quote terms, e.g. 1.0850 for EUR/USD"
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds substantial behavior beyond that: explicit refusal of XAU/XAG/XPT/XPD and crypto, validation that entryPrice and units must be above zero, the deliberate non-rejection of exit prices at or below zero, and the pip/lot conventions used internally.

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?

Front-loaded with the core purpose, then boundary rules, then return shape — a sensible order with almost no filler. It loses a point for redundancy: the precious-metals refusal list (XAU, XAG, XPT, XPD) is stated twice, and the 'The pair is BASE/QUOTE…' sentence begins mid-stream with an awkward capital, breaking the flow of the edge-case list.

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?

No output schema exists, yet the description supplies the return shape (scenarios[] with deltaPips, exitPrice, pnlQuote), the domain constants needed to sanity-check results (pip = 0.01 for JPY quotes, 0.0001 otherwise; standard lot = 100,000 units), and an explicit not-covered list. Nothing an agent needs to call this correctly or interpret the result is missing.

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; the description earns above baseline by resolving the one genuinely dangerous ambiguity — deltasPips are signed by actual price direction and are not pre-adjusted for side — and by pinning pair format (BASE/QUOTE, two distinct ISO 4217 codes, any letter case). It does not add per-parameter detail on units rounding or what precision entryPrice is accepted at.

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 and resource — PnL across a range of hypothetical price moves in pips for a single forex position size, long or short. The 'hypothetical/what-if' framing cleanly separates it from sibling tools like workflow.run_forex_pnl (actual PnL) and workflow.run_forex_pip_value, so an agent can route without opening either schema.

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?

Gives an explicit trigger phrase ('Use when user asks "what if price moves X pips in either direction?"') plus clear exclusions: precious metals and crypto tickers are refused, and spread/commission/swap/slippage/account-currency conversion are out of scope. It stops short of naming the sibling to use instead for realized PnL or pip-value lookups, so the alternative routing is implicit rather than spelled out.

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.