Skip to main content
Glama

azeth_list_conversations

Retrieve all active XMTP messaging conversations to view communication history or verify peer connections. Returns conversation details including peer addresses and timestamps.

Instructions

List all active XMTP messaging conversations.

Use this when: You want to see who you have been communicating with, or check if a conversation exists with a specific peer.

Returns: Array of conversations with peer address and creation time.

Note: First call may be slow due to XMTP initialization.

Example: { }

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").

Implementation Reference

  • Handler implementation for azeth_list_conversations tool.
    server.registerTool(
      'azeth_list_conversations',
      {
        description: [
          'List all active XMTP messaging conversations.',
          '',
          'Use this when: You want to see who you have been communicating with,',
          'or check if a conversation exists with a specific peer.',
          '',
          'Returns: Array of conversations with peer address and creation time.',
          '',
          'Note: First call may be slow due to XMTP initialization.',
          '',
          'Example: { }',
        ].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").'),
        }),
      },
      async (args) => {
        let client;
        try {
          client = await createClient(args.chain);
    
          const conversations = await client.getConversations();
    
          return success({
            conversationCount: conversations.length,
            conversations: conversations.map(conv => ({
              id: conv.id,
              peerAddress: conv.peerAddress,
              createdAt: new Date(conv.createdAt).toISOString(),
            })),
          });
        } catch (err) {
          return handleError(err);
        } finally {
          try { await client?.destroy(); } catch { /* M-10: prevent destroy from masking the original error */ }
        }
      },
    );

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