Skip to main content
Glama

get-message

Retrieve detailed information about a specific message in Zulip by its ID, including edit history, reactions, and metadata, for in-depth analysis and insights.

Instructions

🔍 SINGLE MESSAGE: Get complete details about one specific message when you have its ID. Use this for in-depth analysis, checking edit history, reactions, or metadata. Returns single message with full details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allow_empty_topic_nameNoAllow empty topic names in response (default: false)
apply_markdownNoReturn HTML content (true) or raw Markdown (false). Default: true
message_idYesUnique message ID to retrieve

Implementation Reference

  • The main handler function that executes the get-message tool logic. It calls the ZulipClient to fetch the message by ID and formats the response with key details like sender, content, reactions, and edit history.
    async ({ message_id, apply_markdown, allow_empty_topic_name }) => { try { const result = await zulipClient.getMessage(message_id, { apply_markdown, allow_empty_topic_name }); return createSuccessResponse(JSON.stringify({ message: { id: result.message.id, sender: result.message.sender_full_name, timestamp: new Date(result.message.timestamp * 1000).toISOString(), content: result.message.content, type: result.message.type, topic: result.message.topic || result.message.subject, stream_id: result.message.stream_id, reactions: result.message.reactions, edit_history: result.message.edit_history } }, null, 2)); } catch (error) { return createErrorResponse(`Error getting message: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • Zod schema defining the input parameters for the get-message tool: message_id (required), apply_markdown and allow_empty_topic_name (optional).
    export const GetMessageSchema = z.object({ message_id: z.number().describe("Unique message ID to retrieve"), apply_markdown: z.boolean().optional().describe("Return HTML content (true) or raw Markdown (false). Default: true"), allow_empty_topic_name: z.boolean().optional().describe("Allow empty topic names in response (default: false)") });
  • src/server.ts:887-914 (registration)
    Registration of the 'get-message' tool in the MCP server using server.tool(), including name, description, schema reference, and inline handler function.
    "get-message", "🔍 SINGLE MESSAGE: Get complete details about one specific message when you have its ID. Use this for in-depth analysis, checking edit history, reactions, or metadata. Returns single message with full details.", GetMessageSchema.shape, async ({ message_id, apply_markdown, allow_empty_topic_name }) => { try { const result = await zulipClient.getMessage(message_id, { apply_markdown, allow_empty_topic_name }); return createSuccessResponse(JSON.stringify({ message: { id: result.message.id, sender: result.message.sender_full_name, timestamp: new Date(result.message.timestamp * 1000).toISOString(), content: result.message.content, type: result.message.type, topic: result.message.topic || result.message.subject, stream_id: result.message.stream_id, reactions: result.message.reactions, edit_history: result.message.edit_history } }, null, 2)); } catch (error) { return createErrorResponse(`Error getting message: ${error instanceof Error ? error.message : 'Unknown error'}`); } } );

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