Skip to main content
Glama
mixuechu

Binance MCP Server

by mixuechu

get_symbol_price

Fetch the current cryptocurrency pair price from Binance exchange to monitor market values and support trading decisions.

Instructions

Get the current price of a cryptocurrency pair.

Args: symbol: The cryptocurrency pair, e.g., BTCUSDT.

Returns: Price information from Binance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The main handler function for the 'get_symbol_price' tool. It is decorated with @mcp.tool() for registration and @lru_cache for caching. Fetches the current price from Binance public API endpoint.
    @mcp.tool()
    @lru_cache(maxsize=100)
    def get_symbol_price(symbol: str) -> Any:
        """
        Get the current price of a cryptocurrency pair.
    
        Args:
            symbol: The cryptocurrency pair, e.g., BTCUSDT.
    
        Returns:
            Price information from Binance.
        """
        url = "https://api.binance.com/api/v3/ticker/price"
        params = {"symbol": symbol}
        response = requests.get(url, params=params)
        if response.status_code == 200:
            data = response.json()
            return {"price": data['price'], "symbol": symbol}
        return {"error": response.text}
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions the data source ('Binance') and return type ('Price information'), but lacks critical details like whether this is a real-time or delayed price, rate limits, authentication needs, error handling, or what specific fields the price information includes.

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 appropriately sized and front-loaded, with the core purpose stated first in a clear sentence. The Args and Returns sections are structured but slightly verbose for a single parameter; every sentence earns its place by adding necessary information.

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?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate but has gaps. It covers the basic purpose and parameter, but lacks details on usage context, behavioral traits, and output specifics, which are important for a financial data tool.

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?

With 0% schema description coverage and only one parameter, the description adds essential meaning by explaining the 'symbol' parameter as 'The cryptocurrency pair, e.g., BTCUSDT.' This clarifies the expected format beyond the schema's basic string type, though it could be more detailed about valid symbols or formatting rules.

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 a specific verb ('Get') and resource ('current price of a cryptocurrency pair'), making it immediately understandable. However, it doesn't explicitly distinguish this tool from potential siblings like 'get_trade_history' or 'get_funding_rate_history' that might also return price-related data, preventing 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. With siblings like 'get_trade_history' (which might include prices) and 'place_market_order' (which requires price data), there's no indication of when this specific price-fetching tool is preferred or what its limitations are.

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/mixuechu/binance-mcp'

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