Skip to main content
Glama

check_can_message

Verify if a wallet address is capable of receiving XMTP messages by validating its compatibility with the decentralized messaging network.

Instructions

Check if an address can receive XMTP messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesWallet address to check

Implementation Reference

  • The handler function for the 'check_can_message' tool. It checks if the XMTP client is connected, extracts the address from args, creates an identifier, calls client.canMessage(), and returns whether the address can receive messages.
    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 for the 'check_can_message' tool, defining a required 'address' string property.
    inputSchema: { type: "object", properties: { address: { type: "string", description: "Wallet address to check", }, }, required: ["address"], },
  • src/index.ts:177-190 (registration)
    The tool registration in the ListToolsRequestSchema handler, 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"], }, },
  • src/index.ts:226-227 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes calls to the checkCanMessage handler.
    case "check_can_message": return await this.checkCanMessage(args);

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

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