Skip to main content
Glama

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

Forex Margin Required (Live)

workflow.run_forex_margin_required_live
Read-only

Notional and margin required for a forex position, converted to a given account currency via a live FX rate (same TrueFX/frankfurter.app source as workflow.run_forex_pip_value_live). Edge cases: same input rules as workflow.run_forex_margin_required; when no rate is found for the account currency, available is false and no figure is returned. The rate is a TrueFX tick or a daily ECB reference rate, not a dealer quote. Not covered: broker margin tiers and margin offsets on hedged positions. Use when user asks "how much margin do I need in my account currency?" and the account currency differs from the pair's own quote currency. Returns everything workflow.run_forex_margin_required does, plus accountCurrency, notionalAccount, marginAccount, fxRate, fxSource, available (false + error if no rate could be found). If available is false, do not use any result field (computed figures and any verdict are null or empty), so read available first.

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>",
      "accountCurrency": "<accountCurrency>"
    },
    "name": "workflow.run_forex_margin_required_live"
  }
}

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
accountCurrencyYes3-letter account currency code, e.g. "GBP"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/non-destructive, so the safety bar is low, and the description adds genuinely non-obvious behavior: the rate origin (TrueFX tick or daily ECB reference, explicitly not a dealer quote), the live-source coupling to the pip-value tool, and the failure mode where available=false yields no figures. The only soft spot is that it defers input semantics to a sibling by reference ('same input rules as workflow.run_forex_margin_required') rather than restating them.

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 purpose, then edge cases, then usage trigger, then returns — a sensible order with no filler sentences. It loses a point for duplication: 'when no rate is found for the account currency, available is false and no figure is returned' is restated later as 'If available is false, do not use any result field ... so read available first.'

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?

With no output schema, the description carries the return contract and does so fully — it enumerates accountCurrency, notionalAccount, marginAccount, fxRate, fxSource, and available, and states the null/empty behavior when available is false. For a five-parameter, live-data tool this covers everything an agent needs to call it and interpret the result safely.

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%, so all five parameters are documented in the schema itself and the baseline is 3. The description adds no format or interpretation detail for pair, price, units, leverage, or accountCurrency beyond what the schema already says, though it does clarify that accountCurrency drives the conversion logic.

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 ('Notional and margin required for a forex position, converted to a given account currency via a live FX rate') and immediately pins its identity against the non-live sibling workflow.run_forex_margin_required and against workflow.run_forex_pip_value_live as a rate source. An agent can distinguish it from the many adjacent forex tools without opening any 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?

Gives an explicit trigger ('Use when user asks "how much margin do I need in my account currency?"') plus a narrowing condition (account currency differs from the pair's quote currency). It also names what is out of scope (broker margin tiers, margin offsets on hedged positions), which routes the agent away correctly.

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.