Skip to main content
Glama

azeth_check_reachability

Verify if an Ethereum address can receive XMTP messages on the XMTP network before sending communications.

Instructions

Check if an Ethereum address is reachable on the XMTP messaging network.

Use this when: You want to verify a participant can receive XMTP messages before sending. This is a read-like operation and safe to retry.

The "address" field accepts: an Ethereum address, a participant name, "me", or "#N" (account index).

Returns: The address and whether it is reachable (boolean).

Note: Reachability is cached for 5 minutes. An address is reachable if it has an active XMTP identity. The checking account is determined by the AZETH_PRIVATE_KEY environment variable.

Example: { "address": "Alice" } or { "address": "0x1234567890abcdef1234567890abcdef12345678" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoTarget chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet").
addressYesAddress to check: Ethereum address, participant name, "me", or "#N".

Implementation Reference

  • The implementation of the `azeth_check_reachability` tool, including tool registration, schema definition, and the handler function that checks if an address is reachable on the XMTP network.
    server.registerTool(
      'azeth_check_reachability',
      {
        description: [
          'Check if an Ethereum address is reachable on the XMTP messaging network.',
          '',
          'Use this when: You want to verify a participant can receive XMTP messages before sending.',
          'This is a read-like operation and safe to retry.',
          '',
          'The "address" field accepts: an Ethereum address, a participant name, "me", or "#N" (account index).',
          '',
          'Returns: The address and whether it is reachable (boolean).',
          '',
          'Note: Reachability is cached for 5 minutes. An address is reachable if it has an active XMTP identity.',
          'The checking account is determined by the AZETH_PRIVATE_KEY environment variable.',
          '',
          'Example: { "address": "Alice" } or { "address": "0x1234567890abcdef1234567890abcdef12345678" }',
        ].join('\n'),
        inputSchema: z.object({
          chain: z.string().optional().describe('Target chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet").'),
          address: z.string().describe('Address to check: Ethereum address, participant name, "me", or "#N".'),
        }),
      },
      async (args) => {
        let client;
        try {
          client = await createClient(args.chain);
    
          // Resolve address: address, name, "me", "#N"
          let resolved;
          try {
            resolved = await resolveAddress(args.address, client);
          } catch (resolveErr) {
            return handleError(resolveErr);
          }
    
          const reachable = await client.canReach(resolved.address);
    
          return success({
            address: resolved.address,
            ...(resolved.resolvedFrom ? { resolvedFrom: `"${resolved.resolvedFrom}" → ${resolved.address}` } : {}),
            reachable,
          });
        } catch (err) {
          return handleError(err);
        } finally {
          try { await client?.destroy(); } catch { /* M-10: prevent destroy from masking the original error */ }
        }
      },
    );
Behavior5/5

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

No annotations provided, so description carries full disclosure burden. Successfully documents: return structure (address + boolean), caching semantics (5 minutes), success criteria (active XMTP identity), and authentication mechanism (AZETH_PRIVATE_KEY env var). No contradictions present.

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?

Well-structured with clear sections: purpose, usage trigger, safety note, parameter details, return values, implementation notes, and examples. Every sentence conveys distinct information. Appropriate length for complexity level without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a 2-parameter tool without output schema. Documents return values, caching behavior, environment dependencies, and reachability logic. No gaps remain for safe invocation and result interpretation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% establishing baseline 3. Description adds practical value through concrete JSON examples showing different address formats (participant name 'Alice' vs hex address) and clarifying '#N' refers to account indices. Helps agents understand semantic distinctions between address input formats.

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?

States specific action ('Check') against specific resource ('Ethereum address') within specific domain ('XMTP messaging network'). Clearly distinguishes from sibling messaging tools like azeth_send_message by positioning it as a pre-flight verification capability.

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

Usage Guidelines5/5

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

Contains explicit 'Use this when' clause specifying verification before sending messages. Explicitly identifies appropriate context (pre-send validation) and operational characteristics ('read-like operation and safe to retry'), guiding selection over alternatives like direct message sending.

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/azeth-protocol/mcp-azeth'

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