Skip to main content
Glama

verify-message

Confirm message authenticity by verifying if it was signed by a specific address using provided signature, ensuring secure blockchain interactions without exposing private keys.

Instructions

Verify that a message was signed by the provided address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
messageYes
signatureYes

Implementation Reference

  • The handler function that performs the message verification using wagmi's verifyMessage function with the provided address, message, and signature, returning a text content result.
    execute: async (args) => { const address = args.address as Address const message = args.message const signature = args.signature as `0x${string}` const result = await verifyMessage(wagmiConfig, { address, message, signature, }) return { content: [ { type: "text", text: result.toString(), }, ], } },
  • Zod schema defining the input parameters for the verify-message tool: address (string), message (string), signature (string).
    parameters: z.object({ address: z.string(), message: z.string(), signature: z.string(), }),
  • The registration function that adds the verify-message tool to the FastMCP server, including name, description, schema, and handler.
    export function registerVerifyMessageTools(server: FastMCP): void { server.addTool({ name: "verify-message", description: "Verify that a message was signed by the provided address", parameters: z.object({ address: z.string(), message: z.string(), signature: z.string(), }), execute: async (args) => { const address = args.address as Address const message = args.message const signature = args.signature as `0x${string}` const result = await verifyMessage(wagmiConfig, { address, message, signature, }) return { content: [ { type: "text", text: result.toString(), }, ], } }, }); };
  • Top-level call to register the verify-message tool on the main FastMCP server instance.
    registerVerifyMessageTools(server);

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/mcpilot'

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