Skip to main content
Glama

wallet_sign_message

Sign messages securely using the MCP Crypto Wallet EVM server. Enable Ethereum and EVM-compatible blockchain operations by providing a wallet (private key, mnemonic, or JSON) and the message to sign.

Instructions

Sign a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to sign
walletNoThe wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set.

Implementation Reference

  • The core handler function that performs the message signing using the ethers Wallet instance's signMessage method. It retrieves the wallet using getWallet helper, signs the message, and returns the signature.
    export const signMessageHandler = async (input: any): Promise<ToolResultSchema> => {
      try {
        if (!input.message) {
          return createErrorResponse("Message is required");
        }
    
        const wallet = await getWallet(input.wallet, input.password);
        const signature = await wallet.signMessage(input.message);
    
        return createSuccessResponse(`Message signed successfully
          Signature: ${signature}
          Message: "${input.message}"
        `);
      } catch (error) {
        return createErrorResponse(`Failed to sign message: ${(error as Error).message}`);
      }
    };
  • Defines the tool metadata including name, description, and input schema (wallet optional, message required) for validation in the MCP tool system.
    {
      name: "wallet_sign_message",
      description: "Sign a message",
      inputSchema: {
        type: "object",
        properties: {
          wallet: { type: "string", description: "The wallet (private key, mnemonic, or JSON). If not provided, uses PRIVATE_KEY environment variable if set." },
          message: { type: "string", description: "The message to sign" }
        },
        required: ["message"]
      }
    },
  • src/tools.ts:583-584 (registration)
    Registers the signMessageHandler function to the 'wallet_sign_message' tool name in the handlers dictionary, mapping tool calls to the implementation.
    // Signing Methods
    "wallet_sign_message": signMessageHandler,
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Sign a message' fails to disclose critical traits such as whether this is a read-only or destructive operation, authentication requirements, rate limits, or what the signing process entails (e.g., cryptographic hashing, blockchain interaction). This is inadequate for a tool that likely involves sensitive operations like private key usage.

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 extremely concise with just three words, 'Sign a message', which is front-loaded and wastes no space. While it lacks detail, it is structurally efficient and avoids unnecessary verbosity, earning full marks for conciseness.

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

Completeness1/5

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

Given the complexity of a signing operation (likely involving cryptographic functions and private key handling), the description is severely incomplete. With no annotations, no output schema, and a minimal description that doesn't explain behavior, return values, or error conditions, it fails to provide the necessary context for safe and effective use.

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 ('message' and 'wallet') with their types and purposes. The description adds no additional semantic context beyond what the schema provides, such as format examples or edge cases, but the schema is comprehensive enough to justify a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Sign a message' is a tautology that essentially restates the tool name 'wallet_sign_message' without adding meaningful specificity. It does not clarify what type of signing (e.g., cryptographic, blockchain-based) or distinguish this tool from sibling tools like 'wallet_sign_transaction' or 'wallet_sign_typed_data', leaving the purpose vague beyond the obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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 does not mention sibling tools like 'wallet_verify_message' for verification or differentiate from other signing tools such as 'wallet_sign_transaction', leaving the agent with no context for selection.

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/dcSpark/mcp-cryptowallet-evm'

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