Skip to main content
Glama

set_wallet_loss_cap

Add a loss cap to a Hyperliquid wallet, or lower the one it has. If the wallet loses maxLossPct from the balance at the moment the cap is set, FortFi cancels its open orders, closes its positions and blocks new trades on it until the owner resets the cap in the app. An API key can only add or tighten a cap: raising, removing or resetting it needs the owner's passkey in the app. The cap is also measured from when it is set, so set it before trading.

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": {
      "walletId": "<walletId>",
      "maxLossPct": "<maxLossPct>"
    },
    "name": "set_wallet_loss_cap"
  }
}

Input Schema

NameRequiredDescriptionDefault
walletIdYeshyperliquid-mainnet wallet id
maxLossPctYesMax loss in percent of the balance when set, 1 to 90 (whole numbers)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the exact consequence of breach (cancel open orders, close positions, block new trades until the owner resets in the app), the authorization asymmetry between API key and passkey, and the irreversibility of resetting via this tool. This is precisely the destructive-behavior context an agent needs before calling.

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?

Four sentences, front-loaded with purpose then consequences then authorization then timing, with no filler. Minor redundancy between 'the balance at the moment the cap is set' and the closing 'measured from when it is set' sentence, though the latter adds the actionable 'set it before trading' framing.

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?

Two required parameters, no output schema, no annotations — and the description covers purpose, side effects, authorization limits, and timing semantics without needing return-value detail. Nothing an agent needs in order to call this correctly is missing.

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, but the description adds real meaning: maxLossPct is measured against the balance at the moment the cap is set, and only add/tighten operations are permitted through this path. That constraint materially changes how an agent should choose the value, beyond the schema's range hint.

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 ('Add a loss cap to a Hyperliquid wallet, or lower the one it has') with an explicit direction constraint that distinguishes it from get_wallet_loss_cap in the sibling list. An agent can tell immediately this is the write-side cap tool and that it only tightens, never loosens.

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 concrete usage context: set the cap before trading, since measurement starts at set time, and it explains the authority split (API key may add or tighten; raising/removing/resetting needs the owner's passkey in the app). It does not explicitly point at get_wallet_loss_cap for reading the current cap, which is the only routing gap.

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