Skip to main content
Glama

Dovafy SafePerp / SafeSwap MCP

safe_perp_order_hyperliquid

Read-only

Evaluate live Hyperliquid L1 perpetual market risk (mark price, annualized funding rate, estimated margin, and liquidation distance buffer) and construct an unsigned perpetual order payload carrying the official Dovafy Builder Code (0.03% disclosed fee). Automatically checks maxBuilderFee approval status and returns a one-time gasless EIP-712 authorization URL when needed. Zero custody; never requests private keys.

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>",
      "isBuy": "<isBuy>",
      "sizeUsd": "<sizeUsd>",
      "userAddress": "<userAddress>"
    },
    "name": "safe_perp_order_hyperliquid"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesHyperliquid perpetual market ticker symbol (e.g. BTC, ETH, SOL).
isBuyYesOrder direction: true to open/add a long (buy), false to open/add a short (sell).
sizeUsdYesTarget notional position size in USD (positive finite number).
leverageNoTarget leverage multiplier between 1 and 50 (default 3).
orderTypeNoExecution style: "market" (IOC with slippage guard, default) or "limit" (GTC at limitPrice).
limitPriceNoLimit order price in USD. Required when orderType is "limit".
reduceOnlyNoWhen true, order can only reduce an existing open position without increasing exposure.
slippageBpsNoMarket order price protection slippage in basis points (1 to 500; default 50 = 0.50%).
userAddressYesUser EVM 0x PUBLIC wallet address on Hyperliquid. Never pass a private key.
acknowledgeHighRiskNoSet true to proceed past tight liquidation buffer or elevated leverage risk warnings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / acknowledgeHighRisk / description
      Added value: +"Set true to proceed past tight liquidation buffer or elevated leverage risk warnings."
    • changedInput schema / properties / coin / description
      Previous value: -"Perpetual symbol e.g. BTC, ETH, SOL"New value: +"Hyperliquid perpetual market ticker symbol (e.g. BTC, ETH, SOL)."
    • changedInput schema / properties / isBuy / description
      Previous value: -"true for long, false for short"New value: +"Order direction: true to open/add a long (buy), false to open/add a short (sell)."
    • changedInput schema / properties / leverage / description
      Previous value: -"Target leverage (default 3)"New value: +"Target leverage multiplier between 1 and 50 (default 3)."
    • changedInput schema / properties / limitPrice / description
      Previous value: -"Required when orderType is limit"New value: +"Limit order price in USD. Required when orderType is \"limit\"."
    • addedInput schema / properties / orderType / description
      Added value: +"Execution style: \"market\" (IOC with slippage guard, default) or \"limit\" (GTC at limitPrice)."
    • addedInput schema / properties / reduceOnly / description
      Added value: +"When true, order can only reduce an existing open position without increasing exposure."
    • changedInput schema / properties / sizeUsd / description
      Previous value: -"Notional order size in USD"New value: +"Target notional position size in USD (positive finite number)."
    • addedInput schema / properties / slippageBps / description
      Added value: +"Market order price protection slippage in basis points (1 to 500; default 50 = 0.50%)."
    • changedInput schema / properties / userAddress / description
      Previous value: -"User EVM 0x PUBLIC wallet address"New value: +"User EVM 0x PUBLIC wallet address on Hyperliquid. Never pass a private key."
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, and the description is consistent: it only builds an unsigned payload and never submits or custodies funds. Beyond the annotations it adds real behavioral context: a disclosed 0.03% builder fee, an automatic maxBuilderFee approval check, a one-time gasless EIP-712 authorization URL, and the explicit no-private-key guarantee. It doesn't cover failure modes or rate limits, so not a 5.

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?

Three sentences, front-loaded with the primary action and outcomes, with no filler. It is dense but every clause carries information (risk metrics, fee disclosure, authorization flow, custody guarantee). Slight risk of overload from the parenthetical list, but nothing is redundant.

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 10 parameters, no output schema, and no nested objects, the description does a good job explaining what comes back (unsigned payload, possibly an EIP-712 authorization URL) and the safety posture. It could say more about the shape of the returned payload or what happens on approval failure, but for an unsigned-order builder it is largely complete.

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%, so every parameter is already documented in the schema, including leverage bounds, slippage, and order type enum. The description adds flow context (approval status, authorization URL) but no additional semantics for individual parameters. Baseline 3 applies when the schema carries the parameter burden.

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?

Names a specific composite action on a specific resource: evaluate Hyperliquid L1 perpetual market risk and construct an unsigned order payload. The risk factors (mark price, funding rate, margin, liquidation buffer) and the Dovafy Builder Code are concrete. It does not explicitly contrast itself with siblings like safe_swap_solana, but the resource and chain are distinct enough to tell them apart.

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?

Usage is implied by the description: this is the tool for preparing Hyperliquid perpetual orders. There is no explicit when-to-use versus when-not guidance, no mention of prerequisites (e.g. account funded, market open), and no alternative named. The acknowledgeHighRisk parameter hints at a gating flow, but the description doesn't spell out when an agent should expect that prompt.

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.