Skip to main content
Glama
ethancod1ng

Bybit MCP Server

by ethancod1ng

get_price

Retrieve current market prices for trading symbols like BTCUSDT to monitor cryptocurrency values in real-time through the Bybit exchange integration.

Instructions

Get the current price for a trading symbol

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • Core handler function that executes the get_price tool logic by calling Bybit API's getTickers for the spot category to retrieve the current price.
    async getPrice(symbol: string) {
      try {
        const response = await this.client.getTickers({
          category: 'spot',
          symbol: symbol
        });
        return response;
      } catch (error) {
        throw new Error(`Failed to get price for ${symbol}: ${error instanceof Error ? error.message : JSON.stringify(error)}`);
      }
    }
  • Zod schema definition for the input parameters of the get_price tool, requiring a 'symbol' string.
    export const PriceSchema = z.object({
      symbol: z.string().describe('Trading symbol (e.g., BTCUSDT)')
    });
  • src/tools.ts:15-22 (registration)
    Tool registration in the tools array, defining name, description, and input schema reference for get_price.
    {
      name: 'get_price',
      description: 'Get the current price for a trading symbol',
      inputSchema: {
        type: 'object',
        properties: PriceSchema.shape,
        required: ['symbol']
      }
  • Server-side tool dispatcher that handles the 'get_price' case by invoking the client.getPrice method.
    case 'get_price':
      result = await this.client.getPrice(args.symbol as string);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but does not reveal any behavioral traits such as whether this is a read-only operation, if it requires authentication, rate limits, or what the response format might be. This leaves significant gaps for an agent to understand how the tool behaves.

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?

The description is a single, clear sentence with no wasted words. It is front-loaded with the core action and resource, making it easy to scan and understand quickly. This efficiency is ideal for tool selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a financial tool with no annotations, no output schema, and low schema description coverage, the description is incomplete. It does not cover behavioral aspects like safety, response format, or error handling, which are crucial for an agent to use the tool effectively in a trading context with multiple sibling tools.

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?

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic details. The description mentions 'trading symbol' but does not add meaning beyond what is implied by the parameter name 'symbol'. It lacks specifics like format examples or constraints, though it partially compensates by hinting at the parameter's purpose. Given the low schema coverage, this is a minimal baseline.

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 verb ('Get') and resource ('current price for a trading symbol'), making the purpose understandable. However, it does not explicitly differentiate from siblings like 'get_24hr_ticker' or 'get_orderbook', which might also provide price-related information, so it falls short of a perfect score.

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. For example, it does not specify if this is for real-time prices, how it differs from 'get_24hr_ticker' (which might include 24-hour statistics), or any prerequisites like market hours. This lack of context makes it harder for an agent to choose correctly among siblings.

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

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