Skip to main content
Glama
cryptolir

Hyperliquid

by cryptolir

hl_swap

Convert USDH, USDT0, or USDE spot stablecoins into USDC to back perpetual trades, requiring at least 0.99 USDC per coin and reporting actual amounts sold.

Instructions

Convert a stablecoin held on the spot side — USDH, USDT0 or USDE — into USDC, so it can back perp trades. Only those three coins, only into USDC, and never below 0.99 USDC per coin: if no buyer pays that much, nothing sells. This is not spot trading and cannot buy any other coin. Minimum 11 (at the 0.99 floor that clears the exchange minimum of $10). It can fill partly — report soldSz and usdcReceived, not the amount asked for. Counts against the owner-set daily limit; only what actually sold is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesThe stablecoin to convert into USDC.
amountYesHow many coins to convert, e.g. 123.27. Minimum 11.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses the 0.99 USDC price floor and the all-or-nothing-per-coin behavior at that floor, partial fills, the fact that the sold amount (not the requested amount) is what gets charged against the owner daily limit, and the effective $10 exchange minimum. It also names the return fields (soldSz, usdcReceived) despite there being no 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?

Front-loaded with the core conversion and only slightly bloated by em-dash asides; every clause (coins allowed, floor, partial fills, limit charging) carries operative information rather than filler. Denser than ideal, but nothing is wasted.

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?

For a two-parameter mutation with no annotations and no output schema, the description supplies everything an agent needs: allowed inputs, target asset, price floor, minimum size, partial-fill handling, and which fields to read back. No material gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the enum and amount semantics are already documented and the baseline is 3. The description adds real meaning beyond the schema by explaining why the minimum is 11 (it reflects the exchange's $10 floor at the 0.99 price) and by tying 'amount' to the partial-fill behavior where requested vs. received can differ.

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 (convert) and resource (a stablecoin on the spot side) into a specific output (USDC) for a specific purpose (backing perp trades). It explicitly distinguishes itself from sibling operations by saying 'This is not spot trading and cannot buy any other coin,' so an agent can route between hl_swap and hl_place_order without opening a schema.

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

Usage Guidelines5/5

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

Gives both when-to-use (to turn spot stablecoins into perp collateral) and hard when-not constraints: only USDH/USDT0/USDE, only into USDC, never another coin, not spot trading. Alternatives are implicitly routed away from this tool and no prerequisite ambiguity remains.

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