Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

setAutoAddMargin

Enable or disable auto-add margin for isolated linear positions. When enabled, automatically adds available balance to prevent liquidation. For hedge mode, set positionIdx.

Instructions

Toggle the auto-add-margin feature for a position. When enabled, the system automatically adds margin from available balance to prevent liquidation. Only works in isolated margin mode.

Agent hint: Use this to toggle auto-add-margin on isolated margin positions. Set autoAddMargin to 1 (enable) or 0 (disable). Only works for linear contracts in isolated margin mode. In hedge mode, specify positionIdx (1=buy, 2=sell).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
categoryYes
positionIdxNo
autoAddMarginYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.11

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only mark the tool as non-read-only and non-destructive. The description adds meaningful behavioral context: enabling the feature causes automatic margin additions from available balance to prevent liquidation, and it only works in isolated margin mode. No annotation contradiction exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded and mostly efficient, but the agent hint repeats the isolated-margin constraint and the 1/0 toggle meaning already covered in the first paragraph. This redundancy makes it slightly longer than necessary.

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 simple toggle operation, the description provides the core constraints, contract type, and parameter meanings needed to invoke the tool correctly. There is no output schema, but the behavior and mode restrictions are adequately explained.

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 description coverage is 0%, so the description carries the parameter-explanation burden. It compensates by explaining autoAddMargin values (1=enable, 0=disable) and positionIdx semantics in hedge mode. It doesn't explain symbol or category, but category is enum-limited to linear and symbol is self-explanatory.

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?

The description states a specific verb and resource: toggles the auto-add-margin feature for a position, and clearly explains what enabling it does. It is easy to distinguish from margin-related siblings like addMargin or addReduceMargin because it focuses specifically on the automatic margin feature.

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?

The description explicitly restricts the tool to isolated margin mode and linear contracts, and gives hedge-mode-specific guidance for positionIdx. It doesn't compare against alternative tools directly, but the usage constraints are clear and actionable.

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