Skip to main content
Glama
cuongpo

Rootstock MCP Server

by cuongpo

set_current_wallet

Set the active wallet address for executing transactions on the Rootstock blockchain via the MCP server.

Instructions

Set the current active wallet for transactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesWallet address to set as current

Implementation Reference

  • MCP tool handler that processes the set_current_wallet call, invokes walletManager.setCurrentWallet, and returns a confirmation message.
    private async handleSetCurrentWallet(params: { address: string }) {
      try {
        this.walletManager.setCurrentWallet(params.address);
        return {
          content: [
            {
              type: 'text',
              text: `Current wallet set to: ${params.address}`,
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to set current wallet: ${error}`);
      }
    }
  • Core WalletManager method that validates the wallet exists and sets it as the current active wallet.
    setCurrentWallet(address: string): void {
      if (!this.wallets.has(address.toLowerCase())) {
        throw new Error(`Wallet not found for address: ${address}`);
      }
      this.currentWallet = address.toLowerCase();
    }
  • Tool schema definition including name, description, and input schema for validation in the tools list.
      name: 'set_current_wallet',
      description: 'Set the current active wallet for transactions',
      inputSchema: {
        type: 'object',
        properties: {
          address: {
            type: 'string',
            description: 'Wallet address to set as current',
          },
        },
        required: ['address'],
      },
    },
  • src/index.ts:123-124 (registration)
    Dispatch registration in the CallToolRequestSchema handler switch statement.
    case 'set_current_wallet':
      return await this.handleSetCurrentWallet((args || {}) as unknown as { address: string });
  • Alternative stubbed registration and handler in smithery-server using direct server.tool call with zod schema.
    server.tool(
      "set_current_wallet",
      "Set the current active wallet for transactions",
      {
        address: z.string().describe("Wallet address to set as current"),
      },
      async ({ address }) => {
        try {
          // Note: WalletManager doesn't have setCurrentAddress method,
          // this would need to be implemented or use a different approach
          return {
            content: [
              {
                type: "text",
                text: `Note: Setting current wallet functionality needs to be implemented in WalletManager. Address: ${address}`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error setting current wallet: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
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 mentions setting an active wallet but fails to explain key behaviors: whether this changes global state, requires specific permissions, affects subsequent transactions, or has any side effects like persistence across sessions.

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 wastes no space, making it easy to parse quickly.

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 state-changing tool with no annotations and no output schema, the description is insufficient. It lacks details on behavioral impact, error conditions, or what happens after setting the wallet, leaving significant gaps in understanding how to use this tool effectively.

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 the single 'address' parameter. The description adds no additional semantic context beyond what the schema provides, such as format examples or validation rules, 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 ('Set') and the resource ('current active wallet for transactions'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'create_wallet' or 'import_wallet', which prevents a perfect score.

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 like 'create_wallet' or 'import_wallet', nor does it mention prerequisites such as needing an existing wallet address. It only states what the tool does, not when to invoke it.

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