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"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool checks message reception capability but doesn't describe what the check entails (e.g., network calls, permissions, rate limits), the response format, or any side effects. This leaves significant gaps in understanding how the tool behaves.

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 directly states the tool's purpose without any fluff or redundancy. It is front-loaded and appropriately sized, making it easy to parse quickly.

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?

For a tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the check returns (e.g., boolean, status details), potential error conditions, or how it integrates with sibling tools like 'send_message'. Given the complexity of verifying message reception, more context is needed for 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, with the 'address' parameter clearly documented as a wallet address. The description adds no additional semantic details beyond this, such as address format examples or validation rules. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Check') and resource ('an address can receive XMTP messages'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'connect_xmtp' or 'get_messages', which might have overlapping contexts but different functions.

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

Usage Guidelines2/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, such as whether it should be used before 'send_message' to verify address capability or as a standalone check. There's no mention of prerequisites, exclusions, or recommended contexts, leaving usage unclear.

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

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