Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_hl_cancel_order

Cancel a resting HyperLiquid main-dex perpetual order by client order ID on HyperEVM via CoreWriter without moving funds; use the offchain variant for HIP-3 builder-dex orders.

Instructions

Cancel a HyperLiquid main-dex perp order by cloid via CoreWriter (on-chain). HyperEVM (chain 999) only. Does NOT move funds — only kills the resting order. For HIP-3 builder-dex orders (xyz:GOLD, ...), use factor_hl_cancel_order_offchain.

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": {
      "vault": "<vault>",
      "perp": "<perp>",
      "cloid": "<cloid>"
    },
    "name": "factor_hl_cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
perpYesMain-dex perp asset index (0=BTC, 1=ETH, ...). Use factor_hl_list_perps to look up.
cloidYesClient order id from open/place — 0x + 32 hex chars (128 bits).
vaultYesVault contract address (HyperEVM).
passwordNoWallet password if encrypted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the on-chain CoreWriter path, the chain restriction, and clarifies that no funds move — only the resting order is killed. It stops short of stating behavior when the cloid is unknown/stale or whether cancellation is final, which are the remaining behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences, front-loaded with the action and mechanism, then the constraint, then the routing alternative. No filler or redundant restatement of the tool name.

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?

For a mutation tool without annotations or output schema, the description supplies the critical context an agent needs: chain, mechanism, safety profile (no fund movement), and the correct sibling for builder-dex orders. Only edge-case outcomes and the wallet/password auth implication are left implicit.

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 perp index, cloid format, vault address, and the optional password are already documented inline. The description adds no parameter-level meaning beyond the schema; baseline 3 applies.

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 (cancel), resource (HyperLiquid main-dex perp order), keying method (by cloid), and mechanism (via CoreWriter, on-chain). It also names the exact sibling it is not, so an agent can discriminate it from factor_hl_cancel_order_offchain without opening either 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?

Explicitly scopes usage: HyperEVM (chain 999) only, main-dex perps only, and directs HIP-3 builder-dex orders (xyz:GOLD, ...) to factor_hl_cancel_order_offchain. This is a clear when/when-not with a named alternative.

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