Skip to main content
Glama

hl_swap_collateral

Swap collateral between Hyperliquid clearinghouses or perpetual DEXes (HIP-3) to reallocate funds across trading venues.

Instructions

Swap collateral between HL clearinghouses/perp DEXes (HIP-3). Pass apiKey, walletAddress, sessionPrivateKey, fromToken, toToken, amount or a pre-built computedData.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toDexNo
amountNo
apiKeyNo
fromDexNo
toTokenNo
fromTokenNo
computedDataNo
walletAddressNo
sessionPrivateKeyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.11.3

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, yet it only implies a fund-moving mutation. It does not state auth/permission requirements beyond listing key names, whether the swap is reversible, what happens if fromDex/toDex are omitted, or any rate/limit behavior. For a collateral-moving operation this is a significant gap.

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?

Two sentences, purpose front-loaded, no filler. The second sentence is a compact parameter list; it could be tightened but every clause carries information.

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

Completeness2/5

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

A 9-parameter mutation tool with no annotations, no output schema, and 0% schema coverage should do much more: authentication model, dex defaults, reversal/irreversibility, and any return behavior. The description leaves the agent guessing about most operational details.

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%, so the description must compensate. It enumerates the important inputs (apiKey, walletAddress, sessionPrivateKey, fromToken, toToken, amount) and clarifies the mutually exclusive amount-vs-computedData invocation path the zero-required schema does not express — real added meaning. However it never explains formats or what fromDex/toDex/sessionPrivateKey actually do.

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?

States a specific verb+resource: swapping collateral between HL clearinghouses/perp DEXes, with a HIP-3 qualifier that scopes it to a particular DEX type. No sibling does the same thing (perp_deposit/perp_withdraw are separate flows), but the description never names those alternatives, so differentiation is implicit rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It reveals one branch point — supply amount-based fields 'or a pre-built computedData' — but gives no guidance on when this tool is preferred over perp_deposit, perp_withdraw, or execute_* flows. No prerequisites, no when-not conditions.

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

Deploy Server

Other Tools