get_chat_messages
Retrieve chat messages from meetings by specifying the bot ID to access and manage conversation data for analysis or record-keeping.
Instructions
Get chat messages from the meeting
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bot_id | Yes | ID of the bot to get chat messages for |
Implementation Reference
- src/index.ts:589-606 (handler)The handler function that validates the bot_id, fetches chat messages from the API endpoint `/api/v1/bots/${bot_id}/chat_messages`, formats the response using formatChatMessages, and returns it as MCP content.private async getChatMessages(args: Record<string, unknown>) { const bot_id = args.bot_id as string; if (!bot_id || typeof bot_id !== 'string') { throw new Error("Missing or invalid required parameter: bot_id"); } const data = await this.makeApiRequest(`/api/v1/bots/${bot_id}/chat_messages`); return { content: [ { type: "text", text: this.formatChatMessages(data.results || data, bot_id), }, ], }; }
- src/index.ts:312-325 (registration)Registers the get_chat_messages tool in the ListTools response, including its name, description, and input schema requiring a bot_id.{ name: "get_chat_messages", description: "Get chat messages from the meeting", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot to get chat messages for", }, }, required: ["bot_id"], }, },
- src/index.ts:185-200 (helper)Helper function to format the raw chat messages data into a human-readable string with timestamps, sender names, and message text.private formatChatMessages(data: any, botId: string): string { if (!Array.isArray(data) || data.length === 0) { return `💬 No chat messages found for bot ${botId}`; } let chatOutput = `💬 Chat Messages for bot ${botId}:\n\n`; chatOutput += "─".repeat(50) + "\n"; data.forEach((message: any) => { const timestamp = new Date(message.timestamp_ms || message.timestamp * 1000).toLocaleTimeString(); chatOutput += `[${timestamp}] ${message.sender_name}:\n${message.text}\n\n`; }); chatOutput += "─".repeat(50) + `\n📊 Total messages: ${data.length}`; return chatOutput; }
- src/index.ts:416-417 (handler)Dispatch case in the CallToolRequestSchema handler that routes the tool call to the getChatMessages method.case "get_chat_messages": return await this.getChatMessages(args);