Skip to main content
Glama
Angad-2002

Attendee MCP Server

by Angad-2002

get_chat_messages

Retrieve chat messages from meetings for a specific bot to monitor conversations and extract key discussion points.

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 main handler function for the 'get_chat_messages' tool. It validates the bot_id parameter, makes an API request to retrieve chat messages, formats the response using formatChatMessages helper, 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, bot_id),
          },
        ],
      };
    }
  • src/index.ts:321-334 (registration)
    Registration of the 'get_chat_messages' tool in the list of tools provided by ListToolsRequestSchema, including name, description, and input schema.
    {
      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:428-429 (registration)
    Dispatcher case in the CallToolRequestSchema handler that routes calls to the getChatMessages method.
    case "get_chat_messages":
      return await this.getChatMessages(args);
  • Helper function that formats the raw chat messages data into a human-readable string with timestamps and sender names.
    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.created_at).toLocaleTimeString();
        chatOutput += `[${timestamp}] ${message.sender_name}:\n${message.message}\n\n`;
      });
      
      chatOutput += "─".repeat(50) + `\nπŸ“Š Total messages: ${data.length}`;
      return chatOutput;
    }

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

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