Skip to main content
Glama

get_instruments_info

Retrieve detailed exchange instrument information, including category, symbol, status, and base coin, directly from Bybit API to analyze market data and execute trades efficiently.

Instructions

Get exchange information

Args:
    category (str): Category (spot, linear, inverse, etc.)
    symbol (str): Symbol (e.g., BTCUSDT)
    status (Optional[str]): Status
    baseCoin (Optional[str]): Base coin

Returns:
    Dict: Exchange information

Example:
    get_instruments_info("spot", "BTCUSDT", "Trading", "BTC")

Reference:
    https://bybit-exchange.github.io/docs/v5/market/instrument

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseCoinNoBase coin
categoryYesCategory (spot, linear, inverse, etc.)
statusNoStatus
symbolYesSymbol (e.g., BTCUSDT)

Implementation Reference

  • The primary MCP tool handler for 'get_instruments_info'. Registered via @mcp.tool(), defines input schema using Pydantic Field descriptions, implements logic by calling BybitService helper with error handling and logging.
    @mcp.tool()
    def get_instruments_info(
        category: str = Field(description="Category (spot, linear, inverse, etc.)"),
        symbol: str = Field(description="Symbol (e.g., BTCUSDT)"),
        status: Optional[str] = Field(default=None, description="Status"),
        baseCoin: Optional[str] = Field(default=None, description="Base coin")
    ) -> Dict:
        """
        Get exchange information
    
        Args:
            category (str): Category (spot, linear, inverse, etc.)
            symbol (str): Symbol (e.g., BTCUSDT)
            status (Optional[str]): Status
            baseCoin (Optional[str]): Base coin
    
        Returns:
            Dict: Exchange information
    
        Example:
            get_instruments_info("spot", "BTCUSDT", "Trading", "BTC")
    
        Reference:
            https://bybit-exchange.github.io/docs/v5/market/instrument
        """
        try:
            result = bybit_service.get_instruments_info(category, symbol, status, baseCoin)
            if result.get("retCode") != 0:
                logger.error(f"Failed to get instruments information: {result.get('retMsg')}")
                return {"error": result.get("retMsg")}
            return result
        except Exception as e:
            logger.error(f"Failed to get instruments information: {e}", exc_info=True)
            return {"error": str(e)}
  • Supporting helper method in BybitService class that directly delegates to the underlying pybit.unified_trading.HTTP client's get_instruments_info method.
    def get_instruments_info(self, category: str, symbol: str,
                             status: Optional[str] = None, baseCoin: Optional[str] = None) -> Dict:
        """
        Get exchange information
    
        Args:
            category (str): Category (spot, linear, inverse, etc.)
            symbol (str): Symbol (e.g., BTCUSDT)
            status (Optional[str]): Status
            baseCoin (Optional[str]): Base coin
    
        Returns:
            Dict: Exchange information
        """
        return self.client.get_instruments_info(
            category=category,
            symbol=symbol,
            status=status,
            baseCoin=baseCoin
        )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation (implying read-only) but doesn't mention rate limits, authentication requirements, response format details, or whether this is a real-time or cached data source. The example helps but doesn't fully compensate for missing behavioral context.

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?

The description is well-structured with clear sections (Args, Returns, Example, Reference) and efficiently conveys necessary information. However, the 'Args' section repeats schema descriptions without adding value, and the purpose statement could be more specific about what 'exchange information' means.

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 a 4-parameter read operation with no output schema, the description is adequate but has gaps. It provides parameters and an example but doesn't explain what 'exchange information' actually returns (beyond 'Dict'), doesn't mention error conditions, and doesn't differentiate from sibling tools. The external reference helps but assumes the agent can access it.

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 the schema already documents all parameters. The description adds minimal value beyond what's in the schema - it repeats parameter descriptions verbatim and provides an example showing usage. This meets the baseline for high schema coverage but doesn't add meaningful semantic context.

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?

The description clearly states the tool's purpose with 'Get exchange information' which is a specific verb+resource combination. However, it doesn't differentiate from sibling tools like get_tickers or get_orderbook, which also retrieve market data but for different types of information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_tickers or get_orderbook. There's no mention of what specific 'exchange information' this provides compared to other market data tools, leaving the agent to guess based on parameter names alone.

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

Related 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/dlwjdtn535/mcp-bybit-server'

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