Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_hl_add_isolated_margin

Adjust isolated margin on a HyperEVM perpetual position by adding or withdrawing USD via a signed vault-agent EIP-712 action.

Instructions

Adjust isolated margin (positive = add, negative = withdraw) on a HL perp position via an off-chain EIP-712 action signed by the vault agent. 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>",
      "isLong": "<isLong>",
      "deltaUsd": "<deltaUsd>"
    },
    "name": "factor_hl_add_isolated_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
perpYesPerp symbol.
vaultYesVault contract address.
isLongYesDirection of the position to top up.
deltaUsdYesUSD margin delta — positive to add, negative to withdraw.
passwordNoWallet password if encrypted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full load and does well: it discloses that the operation is an off-chain EIP-712 signed action executed by the vault agent (not an on-chain transaction the caller signs directly) and that it is restricted to chain 999. It stops short of describing failure modes, whether the agent key must be pre-registered, or what the call returns.

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?

Two tight sentences with the operation and its sign convention front-loaded, followed by the execution mechanism and chain restriction. Nothing is wasted and the most decision-relevant information comes first.

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 unannotated mutation tool with five parameters, the definition covers mechanism and chain scope but leaves out prerequisites (position must exist, agent must be authorized), side effects, and any indication of the result. With no output schema, a brief note on what is returned or how the action is submitted would close the gap.

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 all five parameters are already documented, including the deltaUsd sign convention. The description restates that convention but adds no new meaning about units, precision, the 'password' parameter, or how vault/perp are resolved, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Adjust isolated margin ... on a HL perp position') plus the execution mechanism (off-chain EIP-712 action signed by the vault agent) and the chain restriction. This clearly separates it from position open/close/order siblings, though it never names an alternative for comparison.

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 sign convention (positive = add, negative = withdraw) and the 'HyperEVM (chain 999) only' constraint give implied usage boundaries. However, it does not state prerequisites such as an existing perp position, a configured vault agent, or available collateral, and gives no explicit when-to-use vs. deposit/withdraw siblings.

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