Skip to main content
Glama

get_token_balances

Retrieve token balances for a specific wallet address using the Alchemy MCP Plugin. Filter results by token addresses to view specific asset holdings.

Instructions

Get token balances for a specific address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe wallet address to get token balances for
tokenAddressesNoList of token addresses to filter by

Implementation Reference

  • TypeScript type definition for the input parameters of the get_token_balances tool.
    type GetTokenBalancesParams = { address: string; tokenAddresses?: string[] };
  • Validation function to check if arguments match GetTokenBalancesParams type, used in the tool handler.
    const isValidGetTokenBalancesParams = ( args: any ): args is GetTokenBalancesParams => { return ( typeof args === "object" && args !== null && typeof args.address === "string" && (args.tokenAddresses === undefined || Array.isArray(args.tokenAddresses)) ); };
  • index.ts:703-722 (registration)
    Tool registration in the ListTools response, defining the name, description, and JSON input schema for MCP protocol.
    name: "get_token_balances", description: "Get token balances for a specific address", inputSchema: { type: "object", properties: { address: { type: "string", description: "The wallet address to get token balances for", }, tokenAddresses: { type: "array", items: { type: "string", }, description: "List of token addresses to filter by", }, }, required: ["address"], }, },

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/itsanishjain/alchemy-sdk-mcp'

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