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
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The wallet address to get token balances for | |
| tokenAddresses | No | List of token addresses to filter by |
Implementation Reference
- index.ts:59-59 (schema)TypeScript type definition for the input parameters of the get_token_balances tool.type GetTokenBalancesParams = { address: string; tokenAddresses?: string[] };
- index.ts:131-140 (helper)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"], }, },