Skip to main content
Glama

prepare_hyperliquid_perp_order

Prepare a reviewed BTC, ETH, or HYPE Hyperliquid perpetual IOC order for LOCAL user/agent-wallet signing. Validates live asset metadata, lot/tick rules, caller notional cap, mark-oracle divergence, and displayed-L2 fill/impact bounds. Returns an unsigned, short-expiry exchange envelope only when every gate passes. Insight never creates a nonce, receives a key, signs, or submits an order.

Input Schema

NameRequiredDescriptionDefault
sideYes
sizeYes
marketYes
builderFeeNo
limitPriceYes
reduceOnlyYes
clientOrderIdYes
maxNotionalUsdYes
requireFullFillNo
maxPriceImpactBpsYes
expiresAfterSecondsNo
maxMarkOracleDeviationBpsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / builderFee
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "builder": {
      +      "pattern": "^0x[0-9a-fA-F]{40}$",
      +      "type": "string"
      +    },
      +    "feeTenthsOfBasisPoint": {
      +      "maximum": 100,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "maximumFeeTenthsOfBasisPoint": {
      +      "maximum": 100,
      +      "minimum": 1,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "builder",
      +    "feeTenthsOfBasisPoint"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it enumerates the gates (live asset metadata, lot/tick rules, notional cap, mark-oracle divergence, L2 fill/impact), states the output only materializes when all gates pass, and explicitly disclaims key handling, signing and submission. It doesn't say what the agent receives on gate failure or whether validation is performed against cached or live state at call time.

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?

Four dense sentences, front-loaded with what is produced, then the validation gates, then the safety disclaimer. Every clause carries information, though the middle sentence is a long list that an agent may need to parse twice.

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

Completeness3/5

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

There is no output schema and no annotations, so the description must cover both behavior and contract; it does the behavioral side well but leaves the parameters and the failure/error shape undocumented for a 12-param mutation-adjacent tool. Adequate to know when to call it, incomplete for calling it correctly without reading the schema carefully.

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 0% across 12 params, so the description should carry more. It maps conceptually to maxNotionalUsd ('caller notional cap'), maxMarkOracleDeviationBps ('mark-oracle divergence'), maxPriceImpactBps and requireFullFill ('displayed-L2 fill/impact bounds'), and 'short-expiry' hints at expiresAfterSeconds. But builderFee, clientOrderId, reduceOnly and the interplay of the cap thresholds are never explained beyond their regex/range constraints in 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 (prepare), a specific resource (Hyperliquid perpetual IOC order) and narrows scope to BTC/ETH/HYPE for local signing. The phrase 'unsigned, short-expiry exchange envelope' separates it from the sibling verify_hyperliquid_perp_execution, which checks rather than builds an order.

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?

It's clear this is a pre-signing step whose output goes to a LOCAL wallet, and the negative scope ('Insight never creates a nonce, receives a key, signs, or submits') tells the agent not to expect submission from this tool. It never names verify_hyperliquid_perp_execution or pre_trade_safety_check as the follow-on/alternative, so routing between siblings is left implicit.

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.