Skip to main content
Glama

get_balances

Retrieve token balances for any Solana wallet to verify holdings before trading. Free API call, no transaction execution.

Instructions

Get token balances for a wallet address via Jupiter Ultra API.

This function is FREE to call and does not execute any transactions. Use this to check wallet holdings before making trades.

Args: wallet_address: The wallet address to get balances for (optional, will use configured wallet if not provided)

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - wallet_address: The wallet address that was queried - data: Array of token balances with mint addresses, amounts, and decimals - error: Error message if request failed

Example: >>> # Get balances for configured wallet >>> result = await api.get_balances() >>> if result["success"]: ... balances = result["data"] ... for balance in balances: ... print(f"Token: {balance['mint']}, Amount: {balance['amount']}") >>> >>> # Get balances for specific wallet >>> result = await api.get_balances(wallet_address="11111111111111111111111111111112")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_addressNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description discloses key behaviors: the call is free, does not execute transactions, uses a configured wallet if none is provided, and returns a structured dictionary with success/error handling. This goes beyond what the schema indicates.

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 well-structured with Args, Returns, and an Example. It is appropriately sized – every section contributes to understanding, including code snippets illustrating both usage patterns.

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

Completeness5/5

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

The description fully covers the tool's behavior, parameter, return format, and example usage. Given the tool's simplicity and the presence of a detailed return outline, no critical information is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only provides the parameter name and default, with no description. The description explains the parameter's meaning and optional fallback, adding semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get token balances for a wallet address via Jupiter Ultra API.' It distinguishes itself from sibling tools like execute_swap_transaction by explicitly noting it does not execute transactions, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage context: 'Use this to check wallet holdings before making trades.' It does not explicitly state when not to use it or list alternative tools, but the context is sufficient for an AI agent to select it for read-only balance checks.

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/araa47/jupiter-mcp'

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