Skip to main content
Glama

Quant Arbitrage & Risk Calculator MCP

funding_carry_breakeven

Normalize cross-venue perpetual funding intervals (e.g., 1h vs 8h), compute net hourly funding spread, gross APR %, fee+slippage breakeven hours/days, and projected 7d/30d net PnL USD.

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": {
      "long_funding_rate": "<long_funding_rate>",
      "long_interval_hours": "<long_interval_hours>",
      "short_funding_rate": "<short_funding_rate>",
      "short_interval_hours": "<short_interval_hours>",
      "entry_exit_total_fee_bps": "<entry_exit_total_fee_bps>",
      "notional_usd": "<notional_usd>"
    },
    "name": "funding_carry_breakeven"
  }
}

Input Schema

NameRequiredDescriptionDefault
notional_usdYesNotional size per leg in USD.
slippage_bpsNoTotal round-trip slippage cost in bps of notional_usd.
long_funding_rateYesLong leg per-interval funding rate as decimal (e.g., 0.0001 for 0.01%). Positive means longs pay shorts.
short_funding_rateYesShort leg per-interval funding rate as decimal (e.g., 0.0005 for 0.05%). Positive means longs pay shorts (short receives).
long_interval_hoursYesFunding settlement interval in hours for the long leg (e.g., 8 or 1).
short_interval_hoursYesFunding settlement interval in hours for the short leg (e.g., 8 or 1).
entry_exit_total_fee_bpsYesTotal round-trip trading fees (entry + exit across both legs) in bps of notional_usd.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does convey that this is a pure calculation (no mutation, no external calls) and discloses which quantities are derived, but it omits key assumptions behind the 7d/30d projections (e.g., that current funding rates are held constant) and says nothing about rounding, sign conventions for negative spreads, or error behavior when intervals differ.

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?

A single dense sentence with no filler, front-loaded on the primary verb and progressing from normalization to derived metrics. It is packed but every clause maps to a distinct output, so nothing is wasted; a slight structural split would improve scanability.

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?

With 7 parameters, 100% schema coverage, and no output schema, the description usefully enumerates the returned metrics (spread, APR, breakeven, projected PnL), which compensates for the missing output schema. Remaining gaps are the projection assumptions and the treatment of edge cases such as zero or inverted spreads.

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 description coverage is 100%, so baseline is 3, but the description adds real meaning by tying entry_exit_total_fee_bps and slippage_bps together into the breakeven calculation, clarifying how those cost inputs feed the output. It still does not explain how notional_usd scales the PnL projections or how the two interval inputs interact in normalization.

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 specific verbs and resources: normalizes funding intervals across venues, computes net hourly spread, gross APR, fee+slippage breakeven hours/days, and projected 7d/30d net PnL. The enumerated outputs make it unmistakable versus siblings like bs_option_greeks or kelly_position_sizer, which operate on entirely different inputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied by the content: it is for comparing perpetual funding across venues with mismatched settlement intervals. There is no explicit when-to-use statement, no exclusions, and no mention of alternatives or prerequisites (e.g., both legs must be perps on different venues).

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.

Resources