Skip to main content
Glama

get_balance

Check your current account balance across all assets in the simulated crypto exchange to monitor portfolio value and track holdings.

Instructions

Get your current account balance across all assets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for get_balance tool that fetches account balance across all assets via API GET /account/balance and returns the data as JSON text content.
    async () => {
      const data = await apiGet<Array<{ asset: string; available: string; locked: string }>>(
        "/account/balance"
      );
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • src/index.ts:276-293 (registration)
    Registration of the get_balance tool with the MCP server using server.tool(), defining the tool name, description, empty schema, and handler function.
    server.tool(
      "get_balance",
      "Get your current account balance across all assets.",
      {},
      async () => {
        const data = await apiGet<Array<{ asset: string; available: string; locked: string }>>(
          "/account/balance"
        );
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(data, null, 2),
            },
          ],
        };
      }
    );
  • Empty schema object {} indicating get_balance takes no input parameters.
    {},
  • The apiGet helper function that performs authenticated HTTP GET requests to the API, used by get_balance to fetch /account/balance endpoint.
    async function apiGet<T>(path: string): Promise<T> {
      const res = await fetch(`${API_BASE}${path}`, {
        headers: getAuthHeaders(),
      });
      if (!res.ok) {
        const text = await res.text();
        throw new Error(`API GET ${path} failed (${res.status}): ${text}`);
      }
      return res.json() as Promise<T>;
    }
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 a read operation ('Get'), but doesn't mention permissions, rate limits, freshness of data, or what 'across all assets' entails (e.g., aggregated total vs. detailed breakdown). This leaves significant gaps for a tool with zero annotation coverage.

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 action ('Get your current account balance') and adds clarifying scope ('across all assets'). There is zero waste, making it appropriately sized and well-structured for its purpose.

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 (0 parameters, no output schema, no annotations), the description is minimally adequate. It explains what the tool does but lacks details on behavioral traits like data format or usage context. Without annotations or output schema, it should do more to be fully complete, but it meets the basic threshold for a simple read 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?

The tool has 0 parameters, and schema description coverage is 100% (since there are no parameters to describe). The description adds no parameter information, but with 0 params, the baseline is 4 as it doesn't need to compensate for any gaps. It implies no inputs are required, which aligns with the schema.

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 'current account balance across all assets', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_profile' or 'get_ticker', which might also retrieve financial information, so it's not a perfect 5.

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_profile' (which might include balance) or 'get_markets' (which could show asset values). It lacks explicit when/when-not instructions or named alternatives, leaving usage context implied at best.

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/mikusnuz/pexbot-mcp'

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