Skip to main content
Glama

PerpFarms: Funding Rate Arbitrage

Spot-perp carry on one exchange

spot_perp_carry
Read-onlyIdempotent

Cash-and-carry (basis) trades on one exchange: buy the coin on spot and short its perpetual on the same exchange, collecting positive funding with no price risk. Ranked by estimated profit after real costs at the given size and holding time, with links. Spot on one exchange and the perp on another is the Pro tool cross_exchange_spot_perp.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "spot_perp_carry"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinNoTicker as exchanges list it, e.g. BTC, ETH, HYPE, TSLA
sortNoprofit (default), apr_now: funding right now, paid_24h: funding actually paid over the last 24 hours
limitNoRows to return, default 5. Without a key at most 5, with a free key 20, with Pro 50
size_usdNoPosition size per leg in USD; costs come from the live order books at this size. Default 10000
exchangesNoOnly these exchanges (names like Binance, Hyperliquid, Lighter)
hold_daysNoDays you plan to hold the position. Default 7
include_riskyNoAlso show risky pairs: funding above 1% per 8h (usually a squeeze), prices more than 5% apart, or a leg being delisted. Default false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety disclosure is covered. The description adds real context on top: results are ranked by estimated profit net of live order-book costs at the chosen size and holding period, and carry links. It does not spell out the exact return shape, though the absence of an output schema makes that a modest gap.

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 tight sentences: what the trade is, how results are ranked, and which sibling handles the other case. Zero padding and the routing note is placed last, after the core definition.

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 read-only ranked-list tool with full annotation coverage and rich schema, this is nearly sufficient. The remaining gap is that without an output schema the description only gestures at the result contents (ranked rows plus links) rather than telling the agent what fields to expect.

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%, including enum meanings and the tiered limit behavior, so the schema carries parameter semantics. The description only echoes that size and holding time drive the cost estimate, adding interpretation rather than new syntax.

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 — cash-and-carry basis trades on one exchange, buy spot and short the perp — and explicitly distinguishes itself from cross_exchange_spot_perp by naming the cross-venue case as that tool's job. An agent can route 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 Guidelines4/5

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

Clearly framed for the same-exchange basis trade and explicitly routes the cross-exchange variant to the named sibling. What is missing is a when-not statement for adjacent use cases (e.g. pure funding-rate scanning or cost lookups covered by siblings like coin_funding_rates or trading_costs).

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