Skip to main content
Glama

get_wallet_overview

Retrieve a detailed overview of a wallet, including EDU balance, tokens, and NFTs, by specifying the wallet address and optional token or NFT contract addresses.

Instructions

Get an overview of a wallet including EDU, tokens, and NFTs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nftAddressesNoList of NFT contract addresses to check
tokenAddressesNoList of token contract addresses to check
walletAddressYesWallet address to check

Implementation Reference

  • The main handler function that executes the tool logic by fetching EDU native token balance, multiple ERC20 token balances (with USD values from SailFish oracle), and ERC721 NFT balances (optionally with token IDs).
    export async function getWalletOverview(
      walletAddress: string,
      tokenAddresses: string[] = [],
      nftAddresses: string[] = []
    ): Promise<{
      address: string,
      eduBalance: { balance: string, balanceInEdu: string },
      tokens: Array<{ 
        tokenAddress: string,
        balance: string, 
        decimals: number, 
        symbol: string, 
        name: string, 
        formattedBalance: string,
        usdValue?: string
      }>,
      nfts: Array<{
        contractAddress: string,
        name?: string,
        symbol?: string,
        balance: string,
        tokenIds?: string[]
      }>
    }> {
      try {
        // Get EDU balance
        const eduBalance = await getEduBalance(walletAddress);
        
        // Get token balances
        const tokens = await getMultipleTokenBalances(tokenAddresses, walletAddress);
        
        // Get NFT balances
        const nfts = await Promise.all(
          nftAddresses.map(async (nftAddress) => {
            try {
              return await getERC721Balance(nftAddress, walletAddress);
            } catch (error) {
              console.error(`Error fetching NFT balance for ${nftAddress}:`, error);
              return {
                contractAddress: nftAddress,
                balance: '0'
              };
            }
          })
        );
        
        return {
          address: walletAddress,
          eduBalance,
          tokens,
          nfts
        };
      } catch (error) {
        console.error('Error fetching wallet overview:', error);
        throw error;
      }
    }
  • src/index.ts:950-968 (registration)
    MCP tool call handler dispatch that validates parameters and invokes the getWalletOverview function from the blockchain module.
    case 'get_wallet_overview': {
      if (!args.walletAddress || typeof args.walletAddress !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Wallet address is required');
      }
      
      const tokenAddresses = Array.isArray(args.tokenAddresses) ? args.tokenAddresses : [];
      const nftAddresses = Array.isArray(args.nftAddresses) ? args.nftAddresses : [];
      
      const overview = await blockchain.getWalletOverview(args.walletAddress, tokenAddresses, nftAddresses);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(overview, null, 2),
          },
        ],
      };
    }
  • Tool schema definition registered in ListToolsRequestSchema, including input schema with walletAddress (required), optional tokenAddresses and nftAddresses arrays.
      name: 'get_wallet_overview',
      description: 'Get an overview of a wallet including EDU, tokens, and NFTs',
      inputSchema: {
        type: 'object',
        properties: {
          walletAddress: {
            type: 'string',
            description: 'Wallet address to check',
          },
          tokenAddresses: {
            type: 'array',
            items: {
              type: 'string',
            },
            description: 'List of token contract addresses to check',
          },
          nftAddresses: {
            type: 'array',
            items: {
              type: 'string',
            },
            description: 'List of NFT contract addresses to check',
          },
        },
        required: ['walletAddress'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a 'Get' operation (implying read-only) but doesn't disclose behavioral traits like rate limits, authentication needs, error conditions, or what happens with invalid addresses. For a tool with no annotations, this leaves significant gaps.

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?

Single sentence, front-loaded with the core purpose, zero waste. Every word earns its place by specifying the action and data scope efficiently.

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?

For a tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral context needed for safe invocation, leaving the agent with insufficient information.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters (walletAddress, tokenAddresses, nftAddresses). The description mentions these data types but adds no additional meaning beyond what's in the schema, such as format examples or constraints.

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 resource 'overview of a wallet', specifying what data is included (EDU, tokens, NFTs). It distinguishes from siblings like get_edu_balance or get_nft_balance by offering a combined overview, though it doesn't explicitly name alternatives.

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?

No guidance on when to use this tool versus alternatives like get_edu_balance, get_token_balance, or get_nft_balance. The description implies a comprehensive overview but doesn't specify scenarios where this is preferable over individual balance tools.

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

Related 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/SailFish-Finance/educhain-ai-agent-kit'

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