Skip to main content
Glama

binance_account_balances

Retrieve current account balances from Binance using API credentials to monitor cryptocurrency holdings and track portfolio value.

Instructions

Get account balances (requires API key & secret).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute handler for the binance_account_balances tool. It validates input with balancesSchema, calls the binance.account API endpoint with common params, and returns the balances.
    async run(input) {
      balancesSchema.parse(input);
      try {
        const res = await binance.account(withCommonParams({}));
        return res.data?.balances ?? res.data;
      } catch (err) {
        throw toToolError(err);
      }
    }
  • Zod schema for the tool input parameters (empty object, no params required). Used in parameters and parsed in run.
    const balancesSchema = z.object({});
  • src/index.ts:25-40 (registration)
    Registration of the tool (imported as tool_account_balances and included in tools array at line 19) by adding it to the FastMCP server instance via a loop over all tools.
    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;
          }
        },
      });
    });
  • Helper function used in the handler to add recvWindow parameter to API calls.
    export function withCommonParams<T extends Record<string, unknown>>(params: T) {
      return { ...params, recvWindow };
    }
  • Binance Spot client instance used by the tool handler to make the account API call.
    export const binance = new Spot(apiKey, apiSecret, { baseURL });
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 adds value by specifying authentication needs ('requires API key & secret'), which is crucial context. However, it lacks details on rate limits, error handling, or what specific balance information is returned (e.g., types of assets, formatting). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 purpose ('Get account balances') and includes essential context ('requires API key & secret') without any wasted words. It is appropriately sized for a tool with no parameters, making it easy for an agent to parse quickly.

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 API tool with no annotations and no output schema, the description is incomplete. It covers authentication but lacks details on return values (e.g., balance format, asset types), error scenarios, or usage limitations. Without annotations or an output schema, the agent is left with insufficient information to fully understand how to interpret results or handle edge cases.

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?

The input schema has 0 parameters with 100% coverage, meaning there are no parameters to document. The description does not need to add parameter semantics beyond what the schema provides. It appropriately avoids discussing parameters, focusing instead on authentication requirements, which is relevant context. Baseline 4 is applied as there are no parameters to compensate for.

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 the resource 'account balances', making the purpose specific and understandable. It distinguishes from siblings like binance_market_price or binance_trade_placeOrder by focusing on account data rather than market or trade operations. However, it doesn't explicitly differentiate from binance_account_openOrders, which also deals with account-related data, leaving some ambiguity.

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 mentions authentication requirements ('requires API key & secret'), but this is a prerequisite rather than usage context. There is no indication of when to prefer this over other account tools like binance_account_openOrders or market data tools, leaving the agent without clear selection criteria.

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