Skip to main content
Glama

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

Pre Trade Check

workflow.run_pre_trade_check
Read-only

Full pre-trade decision card: orchestrates position sizing, breakeven, liquidation, and funding cost in one call. Use when user describes a full trade setup and asks "should I take this trade?" or "run the numbers on this setup". Provide exchange+symbol to fetch live funding rate automatically. For an R:R-graded verdict on an entry, stop and target, see workflow.run_risk_reward. Returns: positionSize, breakeven, liquidationPrice, fundingCost, overnightBreakevenShift, verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mmrNoMaintenance margin rate, default 0.005
sideYes
symbolNoPerpetual symbol, e.g. "BTCUSDT".
exchangeNoExchange code, e.g. "binance" or "bybit". Used to fetch live funding rate if funding_rate is omitted.
leverageYesLeverage multiplier
risk_pctYesRisk as % of balance, e.g. 1.0 = 1%
stop_lossYesStop-loss price (positive)
hold_hoursNoExpected hold time in hours for overnight shift calc. Default 8.
entry_priceYesEntry price (positive)
contractTypeNolinear = USDT-margined (default), inverse = coin-margined (e.g. Bybit BTCUSD). All returned figures (notional, margin, risk_amount, funding_cost_*) stay USD-denominated either way; recommended_size is USD notional (contracts) for inverse.
fee_open_pctNoOpening fee fraction, default 0.0002
funding_rateNoFunding rate per 8h as decimal, e.g. 0.0001. If omitted, fetched live from exchange.
fee_close_pctNoClosing fee fraction, default 0.0005
account_balanceYesTotal account balance in USDT

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined (e.g. Bybit BTCUSD). All returned figures (notional, margin, risk_amount, funding_cost_*) stay USD-denominated either way; recommended_size is USD notional (contracts) for inverse.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and a closed world, so the safety profile is covered. The description adds real behavioral context beyond that: providing exchange+symbol will fetch a live funding rate automatically, and it enumerates the returned fields (positionSize, breakeven, liquidationPrice, fundingCost, overnightBreakevenShift, verdict) that no output schema documents. It stops short of covering failure modes (e.g. what happens if the live funding lookup fails) or default-dependent behavior.

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 tool's scope, then usage triggers, then the sibling pointer, then returns. Three dense sentences with almost no waste, though the trailing return-field list is close to a data dump and could be trimmed or moved to an output schema.

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 14-parameter orchestration tool with no output schema, the description conveys the orchestration scope, the live-fetch behavior, and the return shape, which is what an agent needs to select and invoke it. It is slightly thin on how the optional parameters (mmr, hold_hours, fee pcts) affect the verdict, but the schema covers those.

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 93%, so the schema already documents nearly every parameter, including the funding-rate fallback and contractType semantics. The description's 'Provide exchange+symbol to fetch live funding rate automatically' largely restates what the exchange/symbol/funding_rate schema descriptions already say, adding little beyond the baseline.

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 — a consolidated 'pre-trade decision card' that orchestrates position sizing, breakeven, liquidation, and funding cost in one call — and explicitly distinguishes itself from workflow.run_risk_reward, which gives an R:R-graded verdict instead. An agent can tell the two workflow tools apart 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?

Names the trigger condition in user language ('should I take this trade?', 'run the numbers on this setup') and points to the alternative workflow.run_risk_reward for entry/stop/target R:R grading. The when-to-use and when-to-use-something-else conditions are both explicit.

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.