get_chat_messages
Retrieve chat messages from meetings for a specific bot to access conversation history and monitor interactions during video calls.
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)Handler function that retrieves chat messages for a bot by making an API request to fetch messages and formats them using formatChatMessages.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:203-445 (registration)Tool registration in the listTools handler, including the tool name, description, and input schema.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: "create_meeting_bot", description: "Create a bot to join a meeting and record/transcribe it", inputSchema: { type: "object", properties: { meeting_url: { type: "string", description: "URL of the meeting (Zoom, Google Meet, or Teams)", }, bot_name: { type: "string", description: "Name for the bot (optional, defaults to 'Go Bot')", default: "Go Bot", }, }, required: ["meeting_url"], }, }, { name: "get_bot_status", description: "Get the current status of a meeting bot", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot to check", }, }, required: ["bot_id"], }, }, { name: "get_meeting_transcript", description: "Get the transcript from a meeting bot", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot whose transcript to retrieve", }, }, required: ["bot_id"], }, }, { name: "remove_meeting_bot", description: "Remove a bot from a meeting", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot to remove", }, }, required: ["bot_id"], }, }, { name: "make_bot_speak", description: "Make a bot speak text during a meeting using text-to-speech", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot that should speak", }, text: { type: "string", description: "Text for the bot to speak", }, voice_language_code: { type: "string", description: "Voice language code (optional, defaults to 'en-US')", default: "en-US", }, voice_name: { type: "string", description: "Voice name (optional, defaults to 'en-US-Casual-K')", default: "en-US-Casual-K", }, }, required: ["bot_id", "text"], }, }, { name: "send_chat_message", description: "Send a chat message from the bot to the meeting", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot that should send the message", }, message: { type: "string", description: "Message text to send", }, }, required: ["bot_id", "message"], }, }, { 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"], }, }, { name: "get_recording", description: "Get the recording URL for a bot", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot to get recording for", }, }, required: ["bot_id"], }, }, { name: "send_image_to_meeting", description: "Send an image to the meeting through the bot (Google Meet only)", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot that should display the image", }, image_url: { type: "string", description: "HTTPS URL of the image to display", }, }, required: ["bot_id", "image_url"], }, }, { name: "send_video_to_meeting", description: "Send a video to the meeting through the bot (Google Meet only)", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot that should play the video", }, video_url: { type: "string", description: "HTTPS URL of the MP4 video to play", }, }, required: ["bot_id", "video_url"], }, }, { name: "delete_bot_data", description: "Delete all data associated with a bot (recordings, transcripts, etc.)", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot to delete data for", }, }, required: ["bot_id"], }, }, ] satisfies Tool[], })); this.server.setRequestHandler(CallToolRequestSchema, async (request) => { try { const args = request.params.arguments || {}; switch (request.params.name) { case "create_meeting_bot": return await this.createMeetingBot(args); case "get_bot_status": return await this.getBotStatus(args); case "get_meeting_transcript": return await this.getMeetingTranscript(args); case "remove_meeting_bot": return await this.removeMeetingBot(args); case "make_bot_speak": return await this.makeBotSpeak(args); case "send_chat_message": return await this.sendChatMessage(args); case "get_chat_messages": return await this.getChatMessages(args); case "get_recording": return await this.getRecording(args); case "send_image_to_meeting": return await this.sendImageToMeeting(args); case "send_video_to_meeting": return await this.sendVideoToMeeting(args); case "delete_bot_data": return await this.deleteBotData(args); default: throw new Error(`Unknown tool: ${request.params.name}`); } } catch (error) { return { content: [ { type: "text", text: `ā Error: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }); }
- src/index.ts:315-324 (schema)Input schema definition for the get_chat_messages tool.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 chat messages into a readable string output.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 (registration)Dispatcher case in callToolRequestSchema handler that routes to the getChatMessages handler.case "get_chat_messages": return await this.getChatMessages(args);