Skip to main content
Glama

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

Carry Trade

workflow.run_carry_trade
Read-only

Delta-neutral carry trade (funding arbitrage) analysis, with a profitable/marginal/loss verdict on top of the same math primitive.funding_arb uses. Compared with primitive.funding_arb, this one adds output for the case where a plain-English verdict is wanted, not just the raw numbers. Use when user asks "is this carry trade worth it?": long on exchange A, short on exchange B, collect the funding rate spread. Returns: netYieldPct, grossProfit, netProfit, breakevenDays, verdict (profitable/marginal/loss).

Input Schema

NameRequiredDescriptionDefault
notionalYesPosition notional in USDT
hold_daysYesHold duration in days
interval_hoursNoHours between funding payments, one interval for both legs (default 8; 1 for hourly venues; 4 or 2 on some symbols). A leg paid on another interval is entered as its rate times (this interval / its own interval).
transfer_fee_pctNoOne-way transfer fee % (default 0.1)
funding_rate_longYesFunding rate on long exchange per interval (decimal)
funding_rate_shortYesFunding rate on short exchange per interval (decimal)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / interval_hours / description
      Previous value: -"Funding interval: 1 or 8 hours (default 8)"New value: +"Hours between funding payments, one interval for both legs (default 8; 1 for hourly venues; 4 or 2 on some symbols). A leg paid on another interval is entered as its rate times (this interval / its own interval)."
    • removedInput schema / properties / interval_hours / enum
      Removed value: -[
      -  1,
      -  8
      -]
    • addedInput schema / properties / interval_hours / maximum
      Added value: +24
    • addedInput schema / properties / interval_hours / minimum
      Added value: +0.25
  2. Added

TDQS

A3.9/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 openWorldHint=false, so the safety profile is covered and the description's burden is lower. On top of that it discloses the computed outputs (netYieldPct, grossProfit, netProfit, breakevenDays, verdict), which matters because there is no output schema. It does not cover edge cases such as negative spreads or what drives a marginal versus loss classification.

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?

The purpose is front-loaded in the first clause and the whole definition fits in one compact block. There is mild redundancy: the profitable/marginal/loss verdict is announced in the opening sentence and repeated verbatim in the Returns list, and the phrase "adds output for the case where a plain-English verdict is wanted, not just the raw numbers" restates the same idea.

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 six-parameter, read-only computation with full schema coverage and no output schema, the definition supplies the missing piece: the return fields and the verdict semantics. The only gap is that the verdict thresholds and the assumptions behind breakevenDays are unstated, which an agent forecasting results would need.

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% and the parameter docs are unusually detailed, including the interval_hours normalization rule for legs on different payment schedules. The description adds only the conceptual framing of a two-leg funding spread and does not touch notional, hold_days, transfer_fee_pct, or interval_hours, so the baseline of 3 is appropriate.

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 specific verb and resource: delta-neutral carry trade (funding arbitrage) analysis that produces a profitable/marginal/loss verdict. It explicitly contrasts itself with primitive.funding_arb. However, that named alternative does not appear in the sibling list (the list has workflow.run_funding_arbitrage, run_funding_breakeven, run_compound_funding), so the differentiation points at a tool the agent may not see.

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?

Gives a clear trigger phrase ("is this carry trade worth it?") and spells out the position setup, long on exchange A and short on exchange B, which tells the agent the exact scenario this serves. It also states the alternative to use when raw numbers alone suffice. There is no explicit "do not use when" guidance against the other funding-related workflow siblings.

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.