Skip to main content
Glama
monostate

Crossmint HR Airdrop MCP

by monostate

check_balance

Verify the SOL token balance of a connected wallet within Crossmint HR Airdrop MCP, designed for corporate HR teams managing token distributions to employees.

Instructions

Check the SOL balance of the connected wallet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the check_balance tool. It verifies a wallet is connected, retrieves the cached SOL balance, estimates required SOL for airdrop based on employee count, and returns a formatted status message.
      private async handleCheckBalance() {
        if (!this.state.connectedWallet) {
          throw new McpError(
            ErrorCode.InvalidRequest,
            'No wallet connected. Please connect a wallet first.'
          );
        }
    
        // In a real implementation, we would refresh the balance from the blockchain
        // For this demo, we'll just return the cached balance
        const { publicKey, solBalance } = this.state.connectedWallet;
        
        // Calculate required SOL for employees
        const employeeCount = this.state.employees.length || 1; // Default to 1 if no employees yet
        const requiredSol = 0.1 * employeeCount; // 0.1 SOL per employee
        
        const isSufficient = solBalance >= requiredSol;
        
        return {
          content: [
            {
              type: 'text',
              text: `
    Wallet Public Key: ${publicKey}
    Current SOL Balance: ${solBalance.toFixed(5)} SOL
    Required for Airdrop: ~${requiredSol.toFixed(5)} SOL (0.1 SOL per employee)
    Status: ${isSufficient ? 'Sufficient balance' : 'Insufficient balance'}
    
    ${!isSufficient ? 'Insufficient tokens. Create a new token? (yes/no)' : ''}
              `.trim(),
            },
          ],
        };
      }
  • The input schema for the check_balance tool, defined as an empty object since no parameters are required.
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • src/server.ts:152-158 (registration)
    Registration of the check_balance tool in the ListToolsRequestSchema handler, including name, description, and schema.
      name: 'check_balance',
      description: 'Check the SOL balance of the connected wallet',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/server.ts:318-319 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes check_balance calls to the handleCheckBalance method.
    case 'check_balance':
      return await this.handleCheckBalance();
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool checks a balance, implying a read-only operation, but does not address potential issues like error handling, rate limits, authentication needs, or what happens if no wallet is connected. This leaves significant gaps in understanding the tool's behavior.

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, clear sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and efficiently conveys the essential information, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema), the description is adequate for a basic read operation. However, without annotations or output schema, it lacks details on return values (e.g., balance format, units) and error conditions, which could be important for an AI agent to use it correctly in a financial context.

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?

The tool has 0 parameters, and the schema description coverage is 100%, so no parameter documentation is needed. The description appropriately does not include parameter information, aligning with the schema. A baseline score of 4 is applied as it correctly avoids redundancy.

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 ('Check') and the resource ('SOL balance of the connected wallet'), making the tool's purpose immediately understandable. However, it does not explicitly differentiate from sibling tools like 'get_state', which might also retrieve wallet information, leaving room for ambiguity in a crowded toolset.

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, such as 'get_state' or other wallet-related tools. It mentions the 'connected wallet' but does not specify prerequisites (e.g., whether a wallet must be connected first) or exclusions, leaving usage context unclear.

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/monostate/Employees-Airdrop-Rewards-MCP'

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