Skip to main content
Glama

Hyperliquid PreFlight

hl_pretrade_check

Read-only

Pre-trade risk check for a Hyperliquid perp position, incl. HIP-3 US stock perps (xyz:NVDA). Returns risk_level low/medium/high with reasons in English and Chinese: leverage tier, delisting and OI cap, stock-market session and closures in your hold window, discovery-bound risk, mark/oracle gap, funding cost, book slippage, approx. liquidation distance, fees. Read-only, places no orders; not charged if data is unavailable. Price $0.02 per call via x402 (see the server instructions for how to pay). Arguments are described in inputSchema.

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": {
      "coin": "<coin>",
      "side": "<side>",
      "size_usd": "<size_usd>",
      "leverage": "<leverage>"
    },
    "name": "hl_pretrade_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesMarket, e.g. xyz:NVDA (HIP-3) or BTC (native). A bare symbol like NVDA picks the most liquid usable listing.
sideYeslong or short
leverageYesLeverage you plan to use
size_usdYesPosition notional in USD
hold_hoursNoOptional planned holding time in hours, default 24, max 720

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description adds meaningful context beyond that: the pricing model ($0.02 per call via x402), the pointer to server instructions for payment, and the billing exception when data is unavailable. The enumerated risk factors (leverage tier, delisting/OI cap, market session, oracle gap, funding, slippage, liquidation distance, fees) also disclose the return content in the absence of an output schema.

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 definition is front-loaded with purpose, then output contents, then behavioral constraints and payment, which is a sensible order. The long risk-factor list is dense but each item is informative; the closing sentence 'Arguments are described in inputSchema' is the only low-value filler.

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 no output schema present, the description appropriately compensates by enumerating what the risk report contains (risk_level plus reasons in English and Chinese). Payment, billing exceptions, and non-execution behavior are covered; only the precise response shape and error behavior are left implicit.

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 every parameter carries its own description, including defaults and the hold_hours maximum, so the schema does the heavy lifting. The description adds only marginal semantic value by noting that arguments are documented in inputSchema and by giving HIP-3 context for the coin argument.

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 — a pre-trade risk check on a Hyperliquid perp position — and scopes the asset class explicitly ('incl. HIP-3 US stock perps (xyz:NVDA)'). This is clearly distinguishable from sibling tools like hl_account_audit or hl_market_verify, which audit accounts or verify markets rather than evaluating a proposed position.

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?

The 'pre-trade' framing implies the moment of use, and 'Read-only, places no orders' clarifies it is not an execution tool. However, it never states when not to use it or points to a sibling alternative for related tasks, so the guidance remains implied rather than explicit.

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.