# set_spot_margin_auto_repay_mode

A write tool on the Bybit MCP server.

Agent View of the PolicyLayer registry record for `set_spot_margin_auto_repay_mode`. HTML page: https://policylayer.com/tools/johnnywic-bybit-mcp/set-spot-margin-auto-repay-mode

## Facts

- Tool: `set_spot_margin_auto_repay_mode`
- Server: Bybit (`johnnywic/bybit-mcp`) — https://policylayer.com/tools/johnnywic-bybit-mcp.md
- Homepage: https://github.com/JohnnyWic/bybit-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_spot_margin_auto_repay_mode",
    "arguments": {}
  }
}
```

## Why set_spot_margin_auto_repay_mode is rated Medium

This tool writes/modifies account settings (auto-repay mode for spot margin) but does not delete data or commit financial transactions directly. However, it has high severity because misconfiguration could lead to unintended automatic margin repayments, excessive fees, or forced liquidations if an AI agent sets this incorrectly without user intent.

From the tool's own definition: "Tool name and description indicate 'Set spot margin auto repay mode' which modifies account margin settings. This is a reversible configuration change to the user's trading account that affects how margin interest is automatically repaid."

## Use case

AI agents use set_spot_margin_auto_repay_mode to create or update resources in Bybit, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Bybit environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Bybit:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "set_spot_margin_auto_repay_mode": {
      "limits": [
        {
          "counter": "set_spot_margin_auto_repay_mode_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Bybit (244)

- `batch_cancel_order` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/batch-cancel-order.md
- `cancel_all_orders` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-all-orders.md
- `cancel_all_rfq_quotes` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-all-rfq-quotes.md
- `cancel_all_rfqs` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-all-rfqs.md
- `cancel_all_spread_orders` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-all-spread-orders.md
- `cancel_new_crypto_loan_fixed_borrow` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-new-crypto-loan-fixed-borrow.md
- `cancel_new_crypto_loan_fixed_supply` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-new-crypto-loan-fixed-supply.md
- `cancel_order` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-order.md
- `cancel_rfq` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-rfq.md
- `cancel_rfq_quote` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-rfq-quote.md
- `cancel_spread_order` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-spread-order.md
- `cancel_withdrawal` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/cancel-withdrawal.md
- `delete_master_api_key` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/delete-master-api-key.md
- `delete_sub_api_key` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/delete-sub-api-key.md
- `delete_sub_uid` — Destructive — https://policylayer.com/tools/johnnywic-bybit-mcp/delete-sub-uid.md
- `execute_hedge_arbitrage_strategy` — Execute — https://policylayer.com/tools/johnnywic-bybit-mcp/execute-hedge-arbitrage-strategy.md
- `freeze_sub_uid` — Execute — https://policylayer.com/tools/johnnywic-bybit-mcp/freeze-sub-uid.md
- `pre_check_order` — Execute — https://policylayer.com/tools/johnnywic-bybit-mcp/pre-check-order.md
- `reset_mmp` — Execute — https://policylayer.com/tools/johnnywic-bybit-mcp/reset-mmp.md
- `set_leverage` — Execute — https://policylayer.com/tools/johnnywic-bybit-mcp/set-leverage.md
- `accept_rfq_non_lp_quote` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/accept-rfq-non-lp-quote.md
- `amend_order` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/amend-order.md
- `batch_place_order` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/batch-place-order.md
- `confirm_convert_quote` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/confirm-convert-quote.md
- `confirm_fiat_quote` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/confirm-fiat-quote.md
- `confirm_small_balance_quote` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/confirm-small-balance-quote.md
- `create_internal_transfer` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/create-internal-transfer.md
- `create_rfq_quote` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/create-rfq-quote.md
- `create_universal_transfer` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/create-universal-transfer.md
- `crypto_loan_adjust_ltv` — Financial — https://policylayer.com/tools/johnnywic-bybit-mcp/crypto-loan-adjust-ltv.md
- …and 214 more: https://policylayer.com/tools/johnnywic-bybit-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=johnnywic-bybit-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/johnnywic-bybit-mcp
