Skip to main content
Glama
nexus-xyz

nexus-exchange-mcp

Official
by nexus-xyz

add_margin

Add or remove isolated margin on an open position to adjust collateral and manage liquidation risk. Specify market, amount, and direction; fails if position isn't in isolated mode.

Instructions

Add or remove isolated margin on an open position. Fails if the position is not in isolated margin mode (MarginModeNotIsolated), if there is no open position in the market (NoOpenPosition), or if a removal breaches the margin floor. amount is a positive decimal string. Requires API credentials. This moves REAL margin on the position.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesUSDX amount to add or remove, as a positive decimal string (> 0).
directionYesWhether to add margin to or remove it from the position.
market_idYesMarket of the open position, e.g. "BTC-USDX-PERP".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A3.7/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 largely meets it: it discloses the API-credential requirement, the named failure modes (MarginModeNotIsolated, NoOpenPosition, margin floor breach), and explicitly warns that REAL margin moves on the position. It stops short of describing the resulting position/balance state or whether a removal frees collateral immediately.

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?

Front-loaded with the operation, followed by failure conditions and the funds warning; four sentences and every one carries weight except for the `amount` restatement, which duplicates the schema verbatim. Slightly padded but well ordered.

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?

There is no output schema, yet the description covers the mutation's semantic danger, auth needs, and error surface, which is most of what an agent needs. The remaining gap is the unexplained overlap with the `adjust_isolated_margin` sibling and no indication of what the call returns on success.

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 three parameters are already documented in the schema, including the enum for `direction` and the positive-decimal rule for `amount`. The description's restatement that `amount` is a positive decimal string adds no meaning beyond the schema, so baseline 3 is correct.

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 pair and resource: add or remove isolated margin on an open position. That is unambiguous on its own, but it does not distinguish itself from the sibling tool `adjust_isolated_margin`, which sounds like it may cover the same operation, so an agent cannot fully route between them from this text alone.

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 description gives clear preconditions for when the call is valid (position must be in isolated mode, must exist, removal must not breach the floor), which is useful context. However, it never names or contrasts the obvious alternative `adjust_isolated_margin`, and there is no when-not-to-use guidance, so usage is only implied.

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