Skip to main content
Glama

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

Forex Swap Cost

workflow.run_forex_swap_cost
Read-only

Total swap/rollover cost (or credit) for holding a forex position overnight, in the pair's own quote currency: no live FX rate needed. Swap rates are broker-set with no free live feed available, so swapPerLotPerNight is always a manual input (quoted per standard lot, matching how commission is quoted in workflow.run_forex_breakeven), not fetched. Negative = cost (you pay), positive = credit (you receive). The live variant is workflow.run_forex_swap_cost_live, which applies when the account currency differs from the pair's quote currency. Precious-metal pairs (XAU, XAG, XPT, XPD) are refused with an error, because their pip and lot size differ by broker. Edge cases: units above zero; nights a whole number above zero; swapPerLotPerNight any number, negative is a cost, positive a credit, quoted per 100,000 units in the quote currency; 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. Not covered: the triple swap on Wednesday (count it in nights yourself), changing swap rates, and account-currency conversion (use workflow.run_forex_swap_cost_live). Use when user asks "how much will holding this position overnight cost me?". Returns: lots, totalSwapQuote, 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>",
      "swapPerLotPerNight": "<swapPerLotPerNight>",
      "nights": "<nights>"
    },
    "name": "workflow.run_forex_swap_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesCurrency pair in BASE/QUOTE format, e.g. "EUR/USD"
unitsYesPosition size in base-currency units
nightsYesNumber of nights the position is held
swapPerLotPerNightYesSwap rate per standard lot (100,000 units) per night, in the pair's quote currency. Negative = cost, positive = credit. Broker-set: get this from the user's broker platform, there is no live source for it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/non-destructive/closed-world, and the description still adds real behavior: no live FX feed exists so swapPerLotPerNight must be supplied manually, precious-metal pairs raise an error because pip/lot sizing is broker-dependent, and Wednesday triple swap is the caller's responsibility. The sign convention (negative = cost, positive = credit) is stated, which is essential for interpreting 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?

Front-loaded with the definition and sign convention before alternatives and edge cases, which is the right ordering. The "Edge cases:" run-on packs several distinct constraints into semicolon-joined fragments and slightly duplicates the schema's parameter wording, costing some readability.

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: input sourcing, sign convention, refusal cases, out-of-scope items, and even the return shape (lots, totalSwapQuote, base, quote). Nothing material is left for the agent to infer.

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 goes beyond it by stating validation constraints absent from the schema — units must be above zero, nights must be a whole number above zero, swap is quoted per 100,000 units of the quote currency, and pair must be two distinct ISO 4217 codes in any letter case. Minor repetition of the schema's own swap-per-lot wording keeps it from a 5.

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 resource and computation: total swap/rollover cost or credit for holding a forex position overnight, denominated in the pair's quote currency. It explicitly distinguishes itself from workflow.run_forex_swap_cost_live, so an agent can route between the two without opening a 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 phrase ("how much will holding this position overnight cost me?"), an explicit alternative with the condition that selects it (live variant when account currency differs from quote currency), and explicit exclusions (precious metals and crypto tickers refused). It also lists what is out of scope (Wednesday triple swap, changing rates, account-currency conversion).

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.