Skip to main content
Glama

binance_market_price

Retrieve current cryptocurrency prices from Binance for trading pairs like BTCUSDT to monitor market values and inform investment decisions.

Instructions

Get the latest price for a symbol (e.g. BTCUSDT).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The main handler for the 'binance_market_price' tool. Defines the tool object with name, description, input schema reference, and the async run function that validates input, fetches the ticker price via the binance client, returns the data, or throws a wrapped error.
    export const tool_market_price: BinanceTool = {
      name: "binance_market_price",
      description: "Get the latest price for a symbol (e.g. BTCUSDT).",
      parameters: priceSchema,
      async run(input) {
        const params = priceSchema.parse(input);
        try {
          const res = await binance.tickerPrice(params.symbol);
          return res.data;
        } catch (err) {
          throw toToolError(err);
        }
      }
    };
  • Zod schema for input validation: requires a 'symbol' string (e.g., BTCUSDT). Used in the tool's parameters and parsed in the run handler.
    const priceSchema = z.object({ symbol: z.string().min(1) });
  • src/index.ts:15-23 (registration)
    The tool_market_price is imported (line 3) and included in the array of tools to be registered with the MCP server.
    const tools = [
      tool_market_price,
      tool_market_klines,
      tool_exchange_info,
      tool_account_balances,
      tool_open_orders,
      tool_place_order,
      tool_cancel_order,
    ];
  • src/index.ts:25-40 (registration)
    Loop that registers each tool (including binance_market_price) to the FastMCP server, copying name/desc/schema and wrapping the tool's run method in an execute handler that stringifies output and handles errors.
    tools.forEach((tool) => {
      server.addTool({
        name: tool.name,
        description: tool.description,
        parameters: tool.parameters,
        execute: async (args) => {
          try {
            const result = await tool.run(args);
            return JSON.stringify(result, null, 2);
          } catch (error) {
            const handled = error instanceof ToolError ? error : new ToolError((error as Error).message);
            throw handled;
          }
        },
      });
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool fetches 'latest price' but doesn't clarify if this is real-time or cached data, whether it requires authentication, rate limits, error handling, or the format of the response. For a financial API tool, this lack of detail is a significant gap in transparency.

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, efficient sentence that front-loads the core functionality ('Get the latest price') and includes a helpful example. There is no wasted verbiage or redundancy, making it highly concise and well-structured for quick comprehension.

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 tool's moderate complexity (financial data fetching), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like authentication, rate limits, or response format, which are critical for an AI agent to use the tool effectively in a real-world context like Binance API integration.

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 context. The description adds value by explaining that 'symbol' represents a trading pair (e.g., 'BTCUSDT'), which clarifies its purpose beyond the schema's type constraints. However, it doesn't detail valid symbol formats or examples beyond one case, leaving some ambiguity.

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 ('latest price for a symbol'), and provides a concrete example ('BTCUSDT'). However, it doesn't explicitly differentiate from sibling tools like 'binance_market_klines' (which might provide price history) or 'binance_market_exchangeInfo' (which might provide broader market data), 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. It doesn't mention sibling tools like 'binance_market_klines' for historical data or 'binance_market_exchangeInfo' for general market info, nor does it specify prerequisites (e.g., authentication needs) or exclusions. This leaves the agent with minimal context for tool selection.

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

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