Skip to main content
Glama

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
NameRequiredDescriptionDefault
bot_idYesID of the bot to get chat messages for

Implementation Reference

  • 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"], }, },
  • 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; }
  • Dispatch case in the CallToolRequestSchema handler that routes the tool call to the getChatMessages method.
    case "get_chat_messages": return await this.getChatMessages(args);

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/rexposadas/attendee-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server