Skip to main content
Glama

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

Funding Breakeven

workflow.run_funding_breakeven
Read-only

Price move needed to cover funding cost + fees over a holding period. Use when user asks "how much does BTC need to move for me to profit after funding?" or "is funding killing my edge on this trade?". Returns: breakevenWithFunding, breakevenWithoutFunding, requiredMovePct.

Input Schema

NameRequiredDescriptionDefault
sideYesTrade direction: "long" or "short"
sizeYesPosition size in base currency
hold_hoursYesHold duration in hours
entry_priceYesEntry price
contractTypeNolinear = USDT-margined (default), inverse = coin-margined. size is USD notional (contracts) for inverse; notional/funding_cost/fee_total/total_carry_cost come back denominated in the base coin.
fee_open_pctNoOpen fee rate (default 0.0002)
funding_rateYesFunding rate per funding interval (decimal, e.g. 0.0001)
fee_close_pctNoClose fee rate (default 0.0005)
funding_interval_hoursNoHours per funding payment, the period funding_rate covers: 8 (default), 1 on Hyperliquid, dYdX, Kraken and Backpack (per-hour rates), 4 or 2 on some symbols of Binance, Bybit, OKX, Gate, KuCoin, MEXC, Aster and Phemex

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / funding_interval_hours / description
      Previous value: -"Hours per funding payment: 8 (default) or 1 (Hyperliquid, dYdX and Kraken, whose rate is per hour)"New value: +"Hours per funding payment, the period funding_rate covers: 8 (default), 1 on Hyperliquid, dYdX, Kraken and Backpack (per-hour rates), 4 or 2 on some symbols of Binance, Bybit, OKX, Gate, KuCoin, MEXC, Aster and Phemex"
    • removedInput schema / properties / funding_interval_hours / enum
      Removed value: -[
      -  8,
      -  1
      -]
    • addedInput schema / properties / funding_interval_hours / maximum
      Added value: +24
    • addedInput schema / properties / funding_interval_hours / minimum
      Added value: +0.25
  2. Changed2 schema fields changed
    • addedInput schema / properties / funding_interval_hours
      Added value: +{
      +  "description": "Hours per funding payment: 8 (default) or 1 (Hyperliquid, dYdX and Kraken, whose rate is per hour)",
      +  "enum": [
      +    8,
      +    1
      +  ],
      +  "type": "number"
      +}
    • changedInput schema / properties / funding_rate / description
      Previous value: -"Funding rate per 8h period (decimal, e.g. 0.0001)"New value: +"Funding rate per funding interval (decimal, e.g. 0.0001)"
  3. Changed1 schema field changed
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  4. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined. size is USD notional (contracts) for inverse; notional/funding_cost/fee_total/total_carry_cost come back denominated in the base coin.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  5. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only, non-destructive, closed-world behavior, so the safety profile needs no restating. The description adds value beyond that by enumerating the three returned fields (breakevenWithFunding, breakevenWithoutFunding, requiredMovePct), which matters because no output schema exists. It does not disclose sign conventions or how funding rate direction is applied, but the core behavior is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact segments: what it computes, when to reach for it via real user phrasings, and what comes back. Front-loaded, zero filler, and no sentence merely restates the title.

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 pure calculation tool with rich schema documentation and no output schema, the description covers purpose, trigger, and return shape adequately. It leaves unstated how fees and funding are composed in the breakeven figure and whether the result is directional, but nothing an agent needs to invoke it correctly is missing.

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 nine parameters — including the nontrivial funding_interval_hours and contractType — are already documented in the schema. The description adds no parameter guidance of its own, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise computational outcome: the price move required to cover funding cost plus fees over a holding period. A specific resource (funding breakeven) is named, but the description does not distinguish it from close siblings like workflow.run_funding_cost, workflow.run_funding_arbitrage, or workflow.run_breakeven_planning.

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?

Provides two concrete user-utterance triggers ('how much does BTC need to move for me to profit after funding?' and 'is funding killing my edge on this trade?'), which gives the agent a clear selection signal. It does not name alternative tools or state when not to use it.

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.