Skip to main content
Glama

WenLong: Hyperliquid trading for AI agents

Place order

place_order
Destructive

Place a REAL order. Market orders are priced by WenLong from its own mark with a small slippage buffer. leverage (integer) is applied to the market before an opening order; omitted, the open position's leverage is used (required when there is no position). take_profit / stop_loss: on a limit order they ride the order; on a market order they are placed as reduce-only triggers after the fill.

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>",
      "order_type": "<order_type>"
    },
    "name": "place_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesMarket name as on Hyperliquid, e.g. BTC, ETH, xyz:GOLD
sideYes
leverageNo
size_usdYesOrder size in USD notional
stop_lossNoStop-loss trigger price
order_typeYes
limit_priceNoRequired for a limit order
margin_modeNoFor a new position; default cross, or isolated where the market allows only isolated. An open position keeps its own mode.
reduce_onlyNoOnly reduce an open position
take_profitNoTake-profit trigger price
client_order_idNoOptional idempotency id (0x + 32 hex), a new one for every new order. Send the same one when retrying the same order: a repeat is not placed twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the description does not need to re-establish that this mutates state. It does add real behavioral context beyond them: market fills are priced off WenLong's mark with a slippage buffer (so the fill price will differ from an external reference), leverage is applied to the market before an opening order, and TP/SL become reduce-only triggers placed after a market fill rather than attached orders. It stops short of describing failure modes (insufficient margin, minimum size) or what is returned on success.

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 imperative purpose statement is front-loaded in four words, then each following sentence covers one parameter cluster (leverage, then TP/SL) with no filler. Dense but readable; the em-dash-style clause structure keeps it compact, though the leverage sentence packs several conditions into one long run-on.

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?

For an 11-parameter destructive mutation with no output schema, the definition covers the non-obvious behaviors well but leaves gaps: nothing says what a successful call returns (order id, fill status, average price), and there is no mention of rejection conditions an agent might need to handle. The idempotency story lives only in the schema's client_order_id description, so the description itself does not warn that retries should reuse the same id.

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 73%, and the description compensates by adding semantics the schema does not: leverage is applied pre-open, defaults to the open position's leverage, and is mandatory with no position; take_profit/stop_loss ride a limit order but are placed as separate reduce-only triggers after a market fill. The remaining parameters (coin, side, size_usd, order_type, margin_mode, reduce_only, client_order_id) are left to the schema, which documents them adequately.

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 ('Place a REAL order') and immediately scopes it with the capitalized 'REAL', signaling a live-money write distinct from any simulated path. It also discloses the pricing source for market orders (WenLong's own mark plus a slippage buffer), which tells the agent this is an execution tool, not a quoting or paper tool, and separates it cleanly from siblings like close_position or get_open_orders.

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?

Provides useful conditional guidance internal to the tool — leverage is required when there is no position, and TP/SL behave differently for limit versus market orders — but never states when to choose this over alternatives such as close_position (to exit) or cancel_order (to retract). Usage is implied by the verb rather than by explicit routing rules.

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.

Resources