Skip to main content
Glama

get-message-read-receipts

Retrieve which users have read a specific message in Zulip to track message visibility and engagement.

Instructions

Get list of users who have read a specific message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesUnique message ID to get read receipts for

Implementation Reference

  • The MCP tool handler function: extracts message_id, calls ZulipClient.getMessageReadReceipts(), processes response to include count and user_ids, handles errors.
    async ({ message_id }) => {
      try {
        const result = await zulipClient.getMessageReadReceipts(message_id);
        return createSuccessResponse(JSON.stringify({
          message_id,
          read_by_count: result.user_ids.length,
          user_ids: result.user_ids
        }, null, 2));
      } catch (error) {
        return createErrorResponse(`Error getting read receipts: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • Zod input schema validation for the tool: requires a single 'message_id' parameter (number).
    export const GetMessageReadReceiptsSchema = z.object({
      message_id: z.number().describe("Unique message ID to get read receipts for")
    });
  • src/server.ts:621-637 (registration)
    Registration of the tool with MCP server: specifies name, description, input schema, and handler function.
    server.tool(
      "get-message-read-receipts",
      "Get list of users who have read a specific message.",
      GetMessageReadReceiptsSchema.shape,
      async ({ message_id }) => {
        try {
          const result = await zulipClient.getMessageReadReceipts(message_id);
          return createSuccessResponse(JSON.stringify({
            message_id,
            read_by_count: result.user_ids.length,
            user_ids: result.user_ids
          }, null, 2));
        } catch (error) {
          return createErrorResponse(`Error getting read receipts: ${error instanceof Error ? error.message : 'Unknown error'}`);
        }
      }
    );
  • ZulipClient helper method: makes authenticated GET request to Zulip API endpoint /messages/{messageId}/read_receipts and returns raw response with user_ids array.
    async getMessageReadReceipts(messageId: number): Promise<{ user_ids: number[] }> {
      const response = await this.client.get(`/messages/${messageId}/read_receipts`);
      return response.data;
    }

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/avisekrath/zulip-mcp-server'

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