Skip to main content
Glama
cuongpo

Rootstock MCP Server

by cuongpo

get_current_wallet

Retrieve active wallet details using the Rootstock MCP Server, enabling quick access to blockchain asset management and transaction data.

Instructions

Get the current active wallet information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_current_wallet' tool. It retrieves the current wallet address and detailed information using the WalletManager and formats the response.
    private async handleGetCurrentWallet() {
      try {
        const address = this.walletManager.getCurrentAddress();
        const walletInfo = this.walletManager.getWalletInfo(address);
        return {
          content: [
            {
              type: 'text',
              text: `Current Wallet:\n\nAddress: ${walletInfo.address}\nPublic Key: ${walletInfo.publicKey}\nPrivate Key: ${walletInfo.privateKey}`,
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to get current wallet: ${error}`);
      }
    }
  • Schema definition for the 'get_current_wallet' tool in the list of available tools, specifying no input parameters.
    {
      name: 'get_current_wallet',
      description: 'Get the current active wallet information',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:126-127 (registration)
    Registration and dispatch point in the CallToolRequestSchema handler switch statement that routes calls to the tool handler.
    case 'get_current_wallet':
      return await this.handleGetCurrentWallet();
  • Core helper method in WalletManager that retrieves the current wallet object, used extensively across tool handlers.
    getCurrentWallet(): ethers.Wallet | ethers.HDNodeWallet {
      if (!this.currentWallet) {
        throw new Error('No current wallet set');
      }
      return this.getWallet(this.currentWallet);
    }
  • Helper method directly used by the tool handler to get the current wallet address.
    getCurrentAddress(): string {
      if (!this.currentWallet) {
        throw new Error('No current wallet set');
      }
      return this.wallets.get(this.currentWallet)!.address;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does without behavioral details. It doesn't disclose if this is a read-only operation, what permissions are needed, error conditions, or the format of returned information, which is insufficient for a tool with zero annotation coverage.

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 directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for a simple tool with no parameters, 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.

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'current active wallet information' includes, such as balance, address, or network details, nor does it cover behavioral aspects like error handling or dependencies, which are crucial for proper tool invocation.

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 with 100% schema description coverage, so no parameter information is needed. The description doesn't add parameter details, but this is acceptable as there are no parameters to document, aligning with the baseline for zero parameters.

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 the resource ('current active wallet information'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list_wallets' or 'get_balance', which also retrieve wallet-related information, so it lacks specific sibling distinction.

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. It doesn't mention prerequisites, such as needing an active wallet set, or compare it to siblings like 'list_wallets' for broader information or 'get_balance' for specific data, 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/cuongpo/rootstock-mcp'

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