Skip to main content
Glama

get-drafts

Retrieve all saved message drafts from Zulip workspaces to review, edit, or send unfinished messages.

Instructions

Retrieve all saved message drafts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:712-734 (registration)
    MCP tool registration for 'get-drafts' including the inline handler that fetches drafts using ZulipClient.getDrafts() and returns formatted MCP response
    server.tool( "get-drafts", "Retrieve all saved message drafts.", {}, async () => { try { const result = await zulipClient.getDrafts(); return createSuccessResponse(JSON.stringify({ draft_count: result.drafts.length, drafts: result.drafts.map(draft => ({ id: draft.id, type: draft.type, to: draft.to, topic: draft.topic, content: draft.content, timestamp: new Date(draft.timestamp * 1000).toISOString() })) }, null, 2)); } catch (error) { return createErrorResponse(`Error getting drafts: ${error instanceof Error ? error.message : 'Unknown error'}`); } } );
  • Core handler in ZulipClient that performs the actual API call to retrieve drafts from Zulip server (/drafts endpoint)
    async getDrafts(): Promise<{ drafts: ZulipDraft[] }> { const response = await this.client.get('/drafts'); 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