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
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | 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"). |
Implementation Reference
- src/tools/messaging.ts:230-270 (handler)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 */ } } }, );