Skip to main content
Glama

get_edu_balance

Retrieve the EDU token balance for a specific wallet address using the 'get_edu_balance' tool from the EDUCHAIN Agent Kit to monitor token holdings.

Instructions

Get the EDU balance of a wallet address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletAddressYesWallet address to check

Implementation Reference

  • Core implementation of get_edu_balance tool: fetches the native EDU token balance for the given address using ethers provider.getBalance, formats it to wei string and ETH decimal string.
    export async function getEduBalance(address: string): Promise<{ balance: string, balanceInEdu: string }> {
      try {
        const provider = getProvider();
        const balance = await provider.getBalance(address);
        const balanceInEdu = ethers.formatEther(balance);
        
        return {
          balance: bigIntToString(balance),
          balanceInEdu
        };
      } catch (error) {
        console.error('Error fetching EDU balance:', error);
        throw error;
      }
    }
  • Input schema and metadata for the get_edu_balance tool, defining the required 'walletAddress' parameter.
    name: 'get_edu_balance',
    description: 'Get the EDU balance of a wallet address',
    inputSchema: {
      type: 'object',
      properties: {
        walletAddress: {
          type: 'string',
          description: 'Wallet address to check',
        },
      },
      required: ['walletAddress'],
    },
  • src/index.ts:869-884 (registration)
    MCP tool registration and execution handler: validates input, calls blockchain.getEduBalance, and returns JSON-formatted result.
    case 'get_edu_balance': {
      if (!args.walletAddress || typeof args.walletAddress !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Wallet address is required');
      }
      
      const balance = await blockchain.getEduBalance(args.walletAddress);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(balance, null, 2),
          },
        ],
      };
    }
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 for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns real-time or cached data, or what happens with invalid addresses. For a financial query tool with zero annotation coverage, this leaves significant behavioral 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?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a simple query tool and front-loads the essential information.

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 financial balance query tool with no annotations and no output schema, the description is insufficient. It doesn't explain what EDU balance represents (native token? staked amount?), what format the response will be in, or error handling. Given the complexity of blockchain queries and lack of structured output documentation, more context is needed.

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%, with the single parameter 'walletAddress' clearly documented in the schema. The description adds no additional parameter information beyond what the schema already provides, so it meets the baseline for high schema coverage but doesn't enhance understanding of parameter usage 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 action ('Get') and resource ('EDU balance of a wallet address'), making the purpose immediately understandable. However, it doesn't differentiate this tool from similar sibling tools like 'get_token_balance' or 'get_wallet_overview', which could also involve wallet balance queries.

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 provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_token_balance' and 'get_wallet_overview' available, there's no indication of when this specific EDU balance query is preferred, nor any mention of prerequisites or constraints.

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