Skip to main content
Glama

Hedge plan

hedge_plan
Read-only

Plan a Hyperliquid short that hedges a Solana token position: runs the pre-trade scans pair_data, wallet_balance (if you pass a wallet), token_security and funding_rate_arbitrage, then sizes the short on the token's own perp (or SOL with a beta estimate if it has none) and shows funding, liquidation price and distance, margin and fees. Read-only: places no order. One fixed charge covers the scans at list price ($0.005 + $0.001 + $0.001 + $0.01; the wallet scan's share is included even when you pass an amount) plus $0.003 for the plan. If a scan fails or no viable plan can be made you get an error and pay nothing. Hyperliquid excludes US persons. Costs $0.02 USDC per call.

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": {
      "mintAddress": "<mintAddress>"
    },
    "name": "hedge_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoToken units held (pass this or walletAddress)
leverageNoLeverage for the short, whole number (default 2; capped at the perp's maximum)
hedgeRatioNoShare of the position to hedge, 0.01–1 (default 1)
mintAddressYesSolana token mint to hedge, or 'SOL'
betaOverrideNoYour beta estimate (0.1–5); default 1
walletAddressNoSolana wallet to read the balance from (pass this or amount)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations say readOnlyHint=true, and the description reinforces it with the concrete claim 'places no order'. Beyond that it discloses pricing math per scan, that a failed scan is free, a geo restriction (US persons excluded), and the full set of outputs (funding, liquidation price/distance, margin, fees) – real value the annotations cannot carry.

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?

One dense paragraph, front-loaded with the purpose, then the mechanics, then the cost and failure semantics. Every sentence carries information, though the pricing parenthesis is heavy and the single-sentence structure makes it slightly harder to scan.

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?

With no output schema, the description still enumerates what the plan returns (funding, liquidation price and distance, margin, fees). Combined with cost, error handling and the read-only guarantee, an agent has everything needed to decide and invoke correctly.

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 coverage is 100%, so parameter meaning is already documented in structured fields. The description adds the conditional that walletAddress triggers the wallet_balance scan and that betaOverride applies only when the token lacks its own perp, but says nothing about leverage or hedgeRatio behavior beyond 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?

States a specific verb (plan), a specific instrument (Hyperliquid short) and the exact problem it solves (hedging a Solana token position). This is clearly distinct from siblings like pair_data or funding_rate_arbitrage, which it names as internal steps rather than alternatives.

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?

Explains the preconditions (pass amount or a wallet) and the fallback path when the token has no perp (SOL with a beta estimate). It does not explicitly say when to call this composite tool instead of calling pair_data/funding_rate_arbitrage directly, which is the one routing decision left to inference.

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