Skip to main content
Glama

update-status

Update your user status with a text message, emoji, and availability. Supports Unicode, custom, and Zulip special emojis.

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

  • MCP tool registration and handler for 'update-status'. Defines the tool with description, uses UpdateStatusSchema for validation, calls zulipClient.updateStatus() and returns success/error responses.
    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'}`);
        }
      }
    );
  • src/server.ts:822-850 (registration)
    Registration of 'update-status' tool via server.tool() with schema from UpdateStatusSchema.shape
    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 for UpdateStatusParams: status_text (max 60 chars), away (boolean), emoji_name, emoji_code, reaction_type (enum: unicode_emoji, realm_emoji, zulip_extra_emoji) - all optional
    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() - sends a POST request to /users/me/status with form-encoded params (status_text, away, emoji_name, emoji_code, reaction_type) to update user status
    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);
    }
  • filterUndefined helper used in the handler to strip undefined values from the update parameters
    function filterUndefined<T extends Record<string, any>>(obj: T): Partial<T> {
      return Object.fromEntries(
        Object.entries(obj).filter(([_, value]) => value !== undefined)
      ) as Partial<T>;
    }
Behavior2/5

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

With no annotations, the description should disclose behavioral traits. It only mentions updating status with emoji and availability, but fails to mention that away is deprecated, that empty status_text clears status, or any side effects. The description adds minimal behavioral context beyond the schema.

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 one sentence with additional examples, making it relatively concise. However, it is front-loaded but could be better structured with separate guidance for each emoji type.

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

Completeness3/5

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

The description covers the main functionality but omits details about the away parameter deprecation, behavior when status_text is empty, and the response format. Given the number of parameters and no output schema, it is somewhat complete but lacks depth.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds value by providing concrete examples of how emoji parameters work together (e.g., emoji_name: 'coffee', emoji_code: '2615' for unicode). This clarifies parameter usage beyond the schema definitions.

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

Purpose5/5

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

The description clearly states the tool updates user status message with emoji and availability. It specifies verb 'Update' and resource 'user status message', and distinguishes from siblings like add-emoji-reaction or edit-message, which are different operations.

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

Usage Guidelines3/5

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

The description implies usage for setting status with emoji but does not explicitly state when to use this tool versus alternatives like send-message or add-emoji-reaction. No exclusions or context provided.

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