Skip to main content
Glama

list_conversations

Retrieve all active XMTP conversations to manage and interact with decentralized messaging network participants effectively.

Instructions

List all active XMTP conversations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'list_conversations' tool. Checks if XMTP client is connected, lists all conversations using client.conversations.list(), maps to id and createdAt, and returns formatted JSON response in MCP content format.
    private async listConversations() { if (!this.state.client) { throw new Error("XMTP client not connected. Use connect_xmtp tool first."); } try { const conversations = await this.state.client.conversations.list(); const conversationList = conversations.map((conv) => { return { id: conv.id, createdAt: conv.createdAt?.toISOString(), } }); return { content: [ { type: "text", text: JSON.stringify(conversationList, null, 2), }, ], }; } catch (error) { throw new Error(`Failed to list conversations: ${error}`); } }
  • src/index.ts:169-176 (registration)
    Registration of the 'list_conversations' tool in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema (no required parameters).
    { name: "list_conversations", description: "List all active XMTP conversations", inputSchema: { type: "object", properties: {}, }, },
  • Input schema definition for the 'list_conversations' tool, specifying an empty object (no input parameters required).
    inputSchema: { type: "object", properties: {}, },
  • src/index.ts:223-224 (registration)
    Dispatch routing in the CallToolRequestSchema handler that routes calls to the 'list_conversations' tool to its handler method.
    case "list_conversations": return await this.listConversations();

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