Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_hl_set_leverage

Set leverage and margin mode (cross/isolated) for an HL perp via an off-chain vault-agent signature on HyperEVM (chain 999); returns submitted=true with no on-chain tx.

Instructions

Set leverage and margin mode (cross/isolated) for a HL perp via an off-chain EIP-712 action signed by the vault agent. HyperEVM (chain 999) only. Returns submitted=true (no on-chain tx).

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>",
      "leverage": "<leverage>",
      "mode": "<mode>"
    },
    "name": "factor_hl_set_leverage"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesMargin mode.
perpYesPerp symbol, e.g. "ETH".
vaultYesVault contract address.
leverageYesInteger leverage in [1, 50].
passwordNoWallet password if encrypted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A4/5.0
Behavior4/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 well: it discloses that the action is off-chain, EIP-712 signed by the vault agent, requires no on-chain transaction, and returns submitted=true. It stops short of covering auth/password requirements or what happens to existing positions when leverage changes, so not a 5.

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 operation, then the environment constraint, then the return contract. No filler or 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 state-changing perp operation with no annotations and no output schema, the description supplies the critical facts an agent needs: signing path, chain restriction, and return shape (no on-chain tx). The unmentioned password/auth flow is the only notable gap, and the schema partially covers that parameter.

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 coverage is 100%, with each parameter already documented including the cross/isolated enum and the [1, 50] leverage range. The description reinforces the mode semantics but adds no syntax or format detail beyond the schema, so the 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 and resource ('Set leverage and margin mode for a HL perp') plus the mechanism (off-chain EIP-712 action signed by the vault agent). This clearly separates it from sibling setters like factor_hl_set_slippage_cap and from position-mutating tools like factor_hl_open_position.

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?

The 'HyperEVM (chain 999) only' constraint tells the agent where this is valid, which is useful scoping. However, there is no guidance on when to use this versus related tools (e.g., adding isolated margin or opening a position), so the agent must infer the workflow context.

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