Skip to main content
Glama

Spl-token Get Balance

spl-token_getBalance
Read-onlyIdempotent

Get token or SOL balance for a wallet. If mint is omitted, returns native SOL balance. SAP MCP context: Protocol spl-token; operation class write. Use for SPL token deploy, mint, transfer, burn, freeze, thaw, and authority management. Confirm mint, decimals, authority, recipient, and amount before writes. Use token tools alongside SAP payments and settlement tools only when token operations are part of the agent service lifecycle. Parameter aliases accepted by SAP MCP for agent ergonomics: owner -> wallet, address -> wallet, pubkey -> wallet. Prefer the canonical schema names in new calls.

SAP MCP execution guidance: Intent: read/discovery workflow. Pricing: free; call directly without x402. Routing: free hosted call; call directly and keep it small/exact when possible. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesMCP content blocks returned to the caller.
isErrorNoTrue when the tool result represents an application-level error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"Spl-token Get Balance input schema. Intent: read/discovery workflow. Pricing: free; call directly without x402. Routing: free hosted call; call directly and keep it small/exact when possible. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required. Use exact field names from this schema; do not guess aliases or include private key material."
  2. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / mint
      Removed value: -{
      -  "description": "Token mint address (base58)",
      -  "type": "string"
      -}
    • removedInput schema / properties / wallet
      Removed value: -{
      -  "description": "Wallet address to check",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "wallet"
      -]
  3. First observed

TDQS

C2.8/5.0
Behavior2/5

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

The description claims 'operation class write' while annotations mark it as readOnlyHint=true, creating a contradiction. Later it says 'Intent: read/discovery workflow', but the inconsistency undermines transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is overly long with boilerplate SAP MCP context and repetitive execution guidance. The essential information could be conveyed in one or two sentences.

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?

Despite zero parameters and an output schema, the description fails to clearly state what the tool returns (e.g., a balance number). It also includes contradictory operational context, leaving gaps for the agent.

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 zero parameters in the schema, the description adds meaning by explaining that omitting mint returns native SOL balance. It also documents parameter aliases, which though not in schema, aids agent ergonomics.

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 first sentence clearly states the tool gets token or SOL balance for a wallet. However, the description includes extraneous context about write operations and SPL token management that dilutes the core purpose.

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 suggests using this tool for deploy, mint, transfer, etc., which are write operations and not applicable to getBalance. It does not clearly state when to use this read-only tool versus other balance tools (e.g., sol_get_balance).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.