Skip to main content
Glama
monostate

Crossmint HR Airdrop MCP

by monostate

connect_wallet

Securely link your Solana wallet to the Crossmint HR Airdrop MCP server to enable token distribution. Provide your private key for wallet authentication.

Instructions

Connect a Solana wallet to the airdrop server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
privateKeyYesThe private key of the Solana wallet (base58 encoded)
rpcUrlNoThe Solana RPC URL to use (optional)

Implementation Reference

  • The main handler function for the 'connect_wallet' tool. It validates input using Zod, creates a Solana connection, derives the keypair from base64 private key, fetches the SOL balance, updates the server state, and returns the connection details.
    private async handleConnectWallet(args: any) {
      try {
        // Validate input
        const schema = z.object({
          privateKey: z.string(),
          rpcUrl: z.string().optional(),
        });
        
        const { privateKey, rpcUrl } = schema.parse(args);
        
        // Connect to Solana
        const connection = new Connection(
          rpcUrl || 'https://api.mainnet-beta.solana.com',
          'confirmed'
        );
        
        let keypair: Keypair;
        try {
          keypair = Keypair.fromSecretKey(Buffer.from(privateKey, 'base64'));
        } catch (e: any) {
          throw new McpError(ErrorCode.InvalidParams, 'Invalid private key format. Please provide a base64 encoded private key.');
        }
        
        const publicKey = keypair.publicKey.toString();
        
        // Get SOL balance
        const balance = await connection.getBalance(keypair.publicKey);
        const solBalance = balance / LAMPORTS_PER_SOL;
        
        // Update state
        this.state.connectedWallet = {
          publicKey,
          solBalance,
        };
        
        return {
          content: [
            {
              type: 'text',
              text: `Wallet connected successfully. Public Key: ${publicKey}\nSOL Balance: ${solBalance} SOL`,
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to connect wallet: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • The tool registration in ListToolsRequestHandler, including name, description, and input schema definition (JSON Schema). Note: description mentions base58 but code expects base64.
    {
      name: 'connect_wallet',
      description: 'Connect a Solana wallet to the airdrop server',
      inputSchema: {
        type: 'object',
        properties: {
          privateKey: {
            type: 'string',
            description: 'The private key of the Solana wallet (base58 encoded)',
          },
          rpcUrl: {
            type: 'string',
            description: 'The Solana RPC URL to use (optional)',
          },
        },
        required: ['privateKey'],
      },
  • src/server.ts:314-316 (registration)
    The dispatch/registration in the CallToolRequestHandler switch statement that routes 'connect_wallet' calls to the handler function.
    case 'connect_wallet':
      return await this.handleConnectWallet(args);
    case 'connect_crossmint_wallet':
  • Zod runtime validation schema inside the handler for input parameters.
    const schema = z.object({
      privateKey: z.string(),
      rpcUrl: z.string().optional(),
    });
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 action ('Connect') but fails to explain what this entails—e.g., whether it establishes a session, requires authentication, has side effects like storing keys, or returns connection status. This leaves critical behavioral traits unspecified for a tool involving private keys.

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, direct sentence that efficiently conveys the core action without unnecessary words. It is front-loaded and appropriately sized for the tool's purpose, with no wasted 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?

Given the complexity of wallet connection (involving private keys and network settings), the lack of annotations and output schema, and the description's minimal detail, it is incomplete. It doesn't cover behavioral aspects, return values, or error handling, leaving gaps that could hinder correct tool invocation in a security-sensitive context.

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?

The input schema has 100% description coverage, clearly documenting both parameters ('privateKey' and 'rpcUrl') with their types and optionality. The description adds no additional semantic context beyond what the schema provides, such as format details for the private key or default RPC behavior, so it meets the baseline for high schema coverage.

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 ('Connect') and the resource ('a Solana wallet to the airdrop server'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'connect_crossmint_wallet', which appears to serve a similar connection purpose but for a different wallet type, leaving room for ambiguity.

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 'connect_crossmint_wallet' or other wallet-related tools. It lacks context on prerequisites, timing, or exclusions, leaving the agent to infer usage based on the tool name alone.

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