Skip to main content
Glama

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

Forex Margin Required

workflow.run_forex_margin_required
Read-only

Notional and margin required for a forex position, in the pair's own quote currency: no live FX rate needed. The live variant is workflow.run_forex_margin_required_live, which applies when the account currency differs from the pair's quote currency. Edge cases: units, price and leverage above zero (leverage 50 means 50:1); the pair is BASE/QUOTE with two different ISO 4217 codes (no pip is needed, so a metal pair is accepted). Margin is notional / leverage in the quote currency. Not covered: broker margin tiers, per-instrument leverage caps, hedge offsets, and conversion to the account currency (use workflow.run_forex_margin_required_live). Use when user asks "how much margin do I need for X lots of EUR/USD at 50:1?". Returns: notionalQuote, marginQuote, base, quote.

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>",
      "units": "<units>",
      "price": "<price>",
      "leverage": "<leverage>"
    },
    "name": "workflow.run_forex_margin_required"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesCurrency pair in BASE/QUOTE format, e.g. "EUR/USD"
priceYesEntry or current price
unitsYesPosition size in base-currency units
leverageYesLeverage multiplier, e.g. 50 for 50:1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare this a read-only, non-destructive, closed-world computation, so the safety profile is covered. The description adds real value beyond that: the formula (margin = notional / leverage, in quote currency), input sanity constraints (units, price, leverage above zero), and an explicit exclusion list (broker margin tiers, per-instrument leverage caps, hedge offsets, account-currency conversion). That is solid disclosure for a pure calculator, though it says nothing about precision/rounding or failure behavior on bad input.

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 and the currency caveat, then edge cases, then exclusions, then return fields — a sensible order. It loses a little to redundancy: the live variant and its selection rule are stated twice, once mid-paragraph and again in the 'Not covered' sentence.

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?

For a four-parameter read-only calculator with no output schema, the description supplies everything needed: formula, currency basis, input constraints, pair format rules, explicit non-coverage, and the returned fields (notionalQuote, marginQuote, base, quote). Nothing material is missing for correct invocation.

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 coverage is 100%, so the baseline is 3, and the schema already defines all four fields. The description does add meaning beyond the schema for two of them — leverage 50 means 50:1, and pair must be BASE/QUOTE with two distinct ISO 4217 codes (metals accepted since no pip is used) — which slightly lifts it, but units/price semantics are left entirely to 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?

States a specific verb+resource (compute notional and margin required for a forex position) and immediately scopes it to the pair's own quote currency so no live FX rate is needed. It also names the sibling workflow.run_forex_margin_required_live and the exact condition that separates the two, so an agent can choose 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: use the live variant when the account currency differs from the pair's quote currency, repeated in the 'Not covered' list. It also gives a concrete trigger phrase ("how much margin do I need for X lots of EUR/USD at 50:1?") so the agent knows what user intent maps here.

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.