Skip to main content
Glama

update-status

Update your Zulip status message with text and emoji to indicate availability or current activity.

Instructions

Update user status message with emoji and availability. Examples: Unicode emoji (emoji_name: 'coffee', emoji_code: '2615'), custom org emoji (reaction_type: 'realm_emoji'), or Zulip special emoji (reaction_type: 'zulip_extra_emoji').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
status_textNoStatus message text (max 60 chars, empty string clears status)
awayNoSet away status (deprecated in Zulip 6.0, will be removed)
emoji_nameNoEmoji name: for unicode use short name (e.g., 'coffee', 'airplane'), for realm_emoji use custom name, for zulip_extra use special names like 'zulip'
emoji_codeNoEmoji identifier: for unicode_emoji use codepoint (e.g., '2615' for coffee), for realm_emoji use custom emoji ID, for zulip_extra use emoji ID
reaction_typeNoEmoji type: 'unicode_emoji' for standard emojis (default), 'realm_emoji' for organization custom emojis, 'zulip_extra_emoji' for special Zulip emojis

Implementation Reference

  • The asynchronous handler function that implements the core logic for the 'update-status' tool. It processes input parameters, filters out undefined values using filterUndefined helper, calls the ZulipClient.updateStatus method, and returns formatted MCP success or error responses.
    async ({ status_text, away, emoji_name, emoji_code, reaction_type }) => {
      try {
        console.error('🔍 SERVER DEBUG - Raw parameters received:', { status_text, away, emoji_name, emoji_code, reaction_type });
        
        const updateParams = filterUndefined({
          status_text,
          away,
          emoji_name,
          emoji_code,
          reaction_type
        });
        
        console.error('🔍 SERVER DEBUG - After filterUndefined:', updateParams);
        
        if (Object.keys(updateParams).length === 0) {
          return createErrorResponse('At least one parameter must be provided to update status');
        }
        
        await zulipClient.updateStatus(updateParams);
        return createSuccessResponse(`Status updated successfully!${status_text ? ` Message: "${status_text}"` : ''}${away !== undefined ? ` Away: ${away}` : ''}`);
      } catch (error) {
        return createErrorResponse(`Error updating status: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • src/server.ts:822-850 (registration)
    Registers the 'update-status' tool with the MCP server using server.tool(), providing the tool name, description, input schema (UpdateStatusSchema.shape), and the handler function.
    server.tool(
      "update-status", 
      "Update user status message with emoji and availability. Examples: Unicode emoji (emoji_name: 'coffee', emoji_code: '2615'), custom org emoji (reaction_type: 'realm_emoji'), or Zulip special emoji (reaction_type: 'zulip_extra_emoji').",
      UpdateStatusSchema.shape,
      async ({ status_text, away, emoji_name, emoji_code, reaction_type }) => {
        try {
          console.error('🔍 SERVER DEBUG - Raw parameters received:', { status_text, away, emoji_name, emoji_code, reaction_type });
          
          const updateParams = filterUndefined({
            status_text,
            away,
            emoji_name,
            emoji_code,
            reaction_type
          });
          
          console.error('🔍 SERVER DEBUG - After filterUndefined:', updateParams);
          
          if (Object.keys(updateParams).length === 0) {
            return createErrorResponse('At least one parameter must be provided to update status');
          }
          
          await zulipClient.updateStatus(updateParams);
          return createSuccessResponse(`Status updated successfully!${status_text ? ` Message: "${status_text}"` : ''}${away !== undefined ? ` Away: ${away}` : ''}`);
        } catch (error) {
          return createErrorResponse(`Error updating status: ${error instanceof Error ? error.message : 'Unknown error'}`);
        }
      }
    );
  • Zod schema defining the input validation and structure for the 'update-status' tool parameters, including descriptions for MCP tool documentation.
    export const UpdateStatusSchema = z.object({
      status_text: z.string().max(60).optional().describe("Status message text (max 60 chars, empty string clears status)"),
      away: z.boolean().optional().describe("Set away status (deprecated in Zulip 6.0, will be removed)"),
      emoji_name: z.string().optional().describe("Emoji name: for unicode use short name (e.g., 'coffee', 'airplane'), for realm_emoji use custom name, for zulip_extra use special names like 'zulip'"),
      emoji_code: z.string().optional().describe("Emoji identifier: for unicode_emoji use codepoint (e.g., '2615' for coffee), for realm_emoji use custom emoji ID, for zulip_extra use emoji ID"),
      reaction_type: z.enum(["unicode_emoji", "realm_emoji", "zulip_extra_emoji"]).optional().describe("Emoji type: 'unicode_emoji' for standard emojis (default), 'realm_emoji' for organization custom emojis, 'zulip_extra_emoji' for special Zulip emojis")
    });
  • ZulipClient.updateStatus helper method that handles the actual Zulip API call to POST /users/me/status with form-encoded parameters, including filtering logic and debug logging.
    async updateStatus(params: {
      status_text?: string;
      away?: boolean;
      emoji_name?: string;
      emoji_code?: string;
      reaction_type?: string;
    }): Promise<void> {
      // Filter out undefined values and empty strings
      const filteredParams: any = {};
      if (params.status_text !== undefined && params.status_text !== null) {
        filteredParams.status_text = params.status_text;
      }
      if (params.away !== undefined) {filteredParams.away = params.away;}
      if (params.emoji_name !== undefined && params.emoji_name !== '') {
        filteredParams.emoji_name = params.emoji_name;
      }
      if (params.emoji_code !== undefined && params.emoji_code !== '') {
        filteredParams.emoji_code = params.emoji_code;
      }
      if (params.reaction_type !== undefined && params.reaction_type !== '') {
        filteredParams.reaction_type = params.reaction_type;
      }
      
      debugLog('🔍 Debug - updateStatus filtered params:', JSON.stringify(filteredParams, null, 2));
      
      // Zulip expects form-encoded data for this endpoint
      const response = await this.client.post('/users/me/status', filteredParams, {
        headers: {
          'Content-Type': 'application/x-www-form-urlencoded'
        },
        transformRequest: [(data) => {
          const params = new URLSearchParams();
          Object.keys(data).forEach(key => {
            params.append(key, data[key]);
          });
          const formString = params.toString();
          debugLog('🔍 Debug - Form-encoded status update:', formString);
          return formString;
        }]
      });
      
      debugLog('✅ Debug - Status updated successfully:', response.data);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation operation ('Update') but doesn't specify permissions required, rate limits, whether changes are reversible, or what the response looks like. The examples add some context but leave critical behavioral traits undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the purpose and follows with specific examples. It avoids unnecessary fluff, though the examples could be slightly more streamlined (e.g., by reducing repetition in emoji type explanations).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral aspects like error conditions, side effects, or return values, leaving significant gaps for an AI agent to understand the tool fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds minimal value by providing examples of emoji usage, but it doesn't explain parameter interactions or semantics beyond what's in the schema descriptions, justifying the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Update') and resource ('user status message with emoji and availability'), making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like 'edit-message' or 'create-scheduled-message', but the focus on status updates is specific enough for general understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'edit-message' or 'send-message', nor does it mention prerequisites or context for status updates. It only offers examples of parameter usage without addressing the tool's situational application.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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