Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_hl_cancel_order_offchain

Cancel a HyperLiquid perp order by cloid through the off-chain Exchange API, including HIP-3 builder-dex orders that CoreWriter cannot route. Kills the resting order without moving funds.

Instructions

Cancel a HyperLiquid perp order by cloid via the off-chain HL Exchange API. Required for HIP-3 builder-dex orders (xyz:GOLD, etc) which CoreWriter does not route. Does NOT move funds — only kills the resting order. HyperEVM (chain 999) only.

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_offchain"
  }
}

Input Schema

NameRequiredDescriptionDefault
perpYesQualified symbol. Builder dex: "xyz:GOLD", "xyz:BRENTOIL", ... Main dex: "ETH", "BTC", or numeric index as string.
cloidYesClient order id — 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.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden yet does useful work: it discloses that no funds move, only a resting order is removed, and the operation is limited to HyperEVM chain 999. It still omits auth requirements (the password parameter hints at an encrypted wallet), whether cancellation is idempotent, and what happens if the cloid is unknown or already filled.

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 tight sentences, front-loaded with the action, then the routing rationale, then the safety and chain constraints. Nothing is redundant or padded.

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 cancel tool with no output schema, the definition covers action, why the off-chain path exists, and the safety profile. The remaining gap is return/error behavior, which an agent would need to know whether a cancel actually landed.

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 baseline is 3; the description adds a little by tying cloid to order identity and vault to the HyperEVM deployment constraint, but most parameter meaning (qualified symbol formats, cloid encoding) is already 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 and resource (cancel a HyperLiquid perp order), the keying field (by cloid), and the transport (off-chain HL Exchange API), which cleanly separates it from the on-chain factor_hl_cancel_order that routes through CoreWriter.

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?

Gives an explicit selection rule: it is required for HIP-3 builder-dex orders such as xyz:GOLD because CoreWriter does not route them. That implies the sibling covers main-dex cancels, though the inverse case is never stated outright and no failure/precondition guidance (e.g. order already filled) is offered.

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