Skip to main content
Glama

verify-message

Verify that a message was signed by a specific Ethereum address using its signature to confirm authenticity and prevent tampering.

Instructions

Verify that a message was signed by the provided address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Ethereum address that signed the original message.
messageYesThe message to be verified.
signatureYesThe signature that was generated by signing the message with the address's signer.

Implementation Reference

  • The execute handler that verifies the signed message using wagmi's verifyMessage function and returns the result as text content.
    execute: async (args) => {
      const result = await verifyMessage(wagmiConfig, args);
      return {
        content: [
          {
            type: "text",
            text: result.toString(),
          },
        ],
      };
    },
  • Input schema defining parameters for address, message, and signature using Zod and imported types.
    parameters: z.object({
      address: Address.describe("The Ethereum address that signed the original message."),
      message: z.string().describe("The message to be verified."),
      signature: Signature.describe("The signature that was generated by signing the message with the address's signer."),
    }),
  • Registration of the verify-message tool on the FastMCP server, including name, description, schema, and handler.
    export function registerVerifyMessageTools(server: FastMCP, wagmiConfig: Config): void {
      server.addTool({
        name: "verify-message",
        description: "Verify that a message was signed by the provided address.",
        parameters: z.object({
          address: Address.describe("The Ethereum address that signed the original message."),
          message: z.string().describe("The message to be verified."),
          signature: Signature.describe("The signature that was generated by signing the message with the address's signer."),
        }),
        execute: async (args) => {
          const result = await verifyMessage(wagmiConfig, args);
          return {
            content: [
              {
                type: "text",
                text: result.toString(),
              },
            ],
          };
        },
      });
    };
  • Invocation of registerVerifyMessageTools in the central tool registration function.
    registerVerifyMessageTools(server, wagmiConfig);
  • Zod schema validator for signature strings used in verify-message tool parameters.
    export const Signature = z.string().transform((val, ctx) => {
      const regex = /^0x[a-fA-F0-9]+$/;
    
      if (!regex.test(val)) {
        ctx.addIssue({
          code: z.ZodIssueCode.custom,
          message: `Invalid Signature ${val}`,
        });
      }
    
      return val as BytesType;
    });
Behavior2/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. It states the tool's function but lacks behavioral details: it doesn't specify what 'verify' entails (e.g., cryptographic validation, return format, error conditions), whether it's read-only or has side effects, or any performance/security considerations. This is a significant gap for a tool with no 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 front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, 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 complexity (cryptographic verification), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what verification entails, the return value (e.g., boolean success/failure), error handling, or cryptographic standards used, leaving the agent with insufficient context for reliable 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?

Schema description coverage is 100%, so the schema already documents all three parameters (address, message, signature) with clear descriptions. The description adds no additional parameter semantics beyond what's in the schema, such as format details or examples, meeting the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('verify') and resource ('message'), with the qualification 'was signed by the provided address' distinguishing it from generic verification. It directly contrasts with the sibling tool 'sign-message', which performs the inverse operation.

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

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: verifying a signature against a message and address, suggesting it's for authentication or integrity checks. However, it doesn't explicitly state when to use this versus alternatives (e.g., other verification methods) or any prerequisites, leaving some guidance implicit rather than explicit.

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

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/Xiawpohr/metamask-mcp'

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