Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

closeGridBot

Closes a running spot grid bot and settles remaining assets according to the chosen close mode (1-4).

Instructions

Closes a running spot grid bot. You must specify a close_mode to determine how remaining assets are settled:

  • 1 (BIT_MODE): settle in BIT

  • 2 (BASE_MODE): convert all to base token

  • 3 (QUOTE_MODE): convert all to quote token

  • 4 (BASE_AND_QUOTE_MODE): return assets as-is, no conversion

The bot must be in a closeable state (NEW or RUNNING). Bots in CANCELLING or COMPLETED state cannot be closed again.

Rate limit: 3 qps per UID.

Agent hint: Use close_mode=3 (QUOTE_MODE) if the user wants to cash out to stablecoin. Use close_mode=4 if the user wants to keep both tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grid_idYes
close_modeYes
Behavior4/5

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

Discloses settlement modes, required bot state, and rate limit of 3 qps per UID. No annotations provided, so description bears full burden. Could mention return behavior or error handling, but overall adequate.

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?

Concise, front-loaded with action, uses clear structure with line breaks and bullet-style list for modes. Agent hint adds value without redundancy.

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?

Covers essential behavioral aspects (action, modes, state constraints, rate limit) given no output schema or annotations. Lacks details on error cases and grid_id source, but complete enough for typical usage.

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 0%, so description must add meaning. Provides detailed semantics for close_mode (enum meanings and hints), but grid_id is not explained beyond its implied role as bot identifier. Adds value for one of two parameters.

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?

Clearly states the tool closes a running spot grid bot, with specific verb and resource. Distinguishes from sibling close tools for other bot types (e.g., closeComboBot).

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?

Explicitly lists required close_mode with explanations of each option, and states the bot must be in NEW or RUNNING state. Includes agent hint for optimal mode selection. Lacks explicit exclusion of alternatives but context implies scope.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bybit-exchange/trading-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server