Skip to main content
Glama

derivatives.funding_apr_matrix

Turn a perpetual funding rate into APR and breakeven days for a spot-plus-perp carry trade, revealing which side collects funding and how many days recoup round-trip costs.

Instructions

Annualize a perpetual funding rate into APR + carry-trade breakeven days:
evaluates a spot+perpetual cash-and-carry trade, tells you which side
collects funding, and how many days of income recoups round-trip costs.
Pure calculation layer on top of get_funding_rate - no extra upstream call,
so prefer this over get_funding_rate whenever you need the APR/breakeven
view rather than the raw rate.

Use this to evaluate a spot+perpetual carry trade. Does NOT account for
margin borrow cost, spot-perp basis risk, or perp liquidation risk - treat
breakeven_days as a rough estimate, not a guaranteed profit timeline.

Args:
    symbol: e.g. "BTC", "ETH", or "BTCUSDT".
    assumed_round_trip_cost_pct: Combined entry+exit trading fee % across
        both legs (default 0.2). Pass your own fee tier for accuracy.

Returns:
    On success: {"success": true, "apr_pct", "collects_funding_side",
        "breakeven_days", ...}
    On failure: {"success": false, "error": {"type", "message"}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
assumed_round_trip_cost_pctNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.0.3

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden, and it delivers: it discloses this is a 'pure calculation layer' with 'no extra upstream call' (implying fast, non-mutating), lists excluded cost/risk factors, and warns that breakeven_days is 'a rough estimate, not a guaranteed profit timeline.' The only minor gap is a slight ambiguity in 'on top of get_funding_rate - no extra upstream call' that never fully clarifies whether the rate is fetched internally.

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 structure is well front-loaded: purpose first, routing second, limitations third, then Args/Returns. Nearly every sentence earns its place, but there is minor redundancy — 'evaluates a spot+perpetual cash-and-carry trade' (paragraph 1) and 'Use this to evaluate a spot+perpetual carry trade' (paragraph 3) restate the same idea.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there is no output schema and no annotations, the description covers all bases: purpose, sibling routing, limitations, parameter semantics, and an explicit success/failure return contract ('apr_pct', 'collects_funding_side', 'breakeven_days' vs. 'error': {'type', 'message'}). Nothing an agent needs to call this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully compensates. symbol gets concrete format examples ('BTC', 'ETH', 'BTCUSDT'), and assumed_round_trip_cost_pct gets a precise definition ('combined entry+exit trading fee % across both legs') plus actionable guidance to 'pass your own fee tier for accuracy.' An agent can determine correct values for both parameters without opening the schema.

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?

The description opens with a specific verb+resource: 'Annualize a perpetual funding rate into APR + carry-trade breakeven days,' and concretely states what it computes (which side collects funding, how many days recoup round-trip costs). It also differentiates from the sibling derivatives.funding_rate by positioning itself as the APR/breakeven view rather than the raw-rate view.

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?

Explicit guidance is given: 'prefer this over get_funding_rate whenever you need the APR/breakeven view rather than the raw rate,' and it names the exact use case ('Use this to evaluate a spot+perpetual carry trade'). It also states what the tool does NOT cover (margin borrow cost, basis risk, liquidation risk), giving the agent clear when-not-to-trust conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/parkyucheol-del/alphapipeline'

If you have feedback or need assistance with the MCP directory API, please join our Discord server