Skip to main content
Glama

check_can_message

Verify if a wallet address can receive encrypted messages on the XMTP decentralized messaging network before sending communications.

Instructions

Check if an address can receive XMTP messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesWallet address to check

Implementation Reference

  • The handler function that executes the check_can_message tool. It validates the XMTP client connection, creates an identifier for the given address, calls client.canMessage to check messaging capability, and returns the result as text content.
    private async checkCanMessage(args: any) { if (!this.state.client) { throw new Error("XMTP client not connected. Use connect_xmtp tool first."); } const { address } = args; try { // Convert address to proper identifier format const identifier = { identifier: address, identifierKind: 0, // IdentifierKind.Ethereum }; const canMessage = await this.state.client.canMessage([identifier]); return { content: [ { type: "text", text: `Address ${address} can receive XMTP messages: ${canMessage.get(address)}`, }, ], }; } catch (error) { throw new Error(`Failed to check messaging capability: ${error}`); } }
  • The input schema definition for the check_can_message tool, specifying a required 'address' string parameter.
    inputSchema: { type: "object", properties: { address: { type: "string", description: "Wallet address to check", }, }, required: ["address"], },
  • src/index.ts:226-228 (registration)
    The switch case registration that dispatches calls to the check_can_message tool to its handler method.
    case "check_can_message": return await this.checkCanMessage(args);
  • src/index.ts:177-190 (registration)
    The tool manifest entry in listTools response, including name, description, and input schema.
    { name: "check_can_message", description: "Check if an address can receive XMTP messages", inputSchema: { type: "object", properties: { address: { type: "string", description: "Wallet address to check", }, }, required: ["address"], }, },

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/kwaude/xmtp-mcp'

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