Skip to main content
Glama

delete-message

Remove messages from Zulip workspaces by specifying their unique ID to manage content and maintain organized communication channels.

Instructions

Delete a message by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesUnique ID of the message to delete

Implementation Reference

  • The MCP tool handler function for 'delete-message'. It takes message_id parameter and calls zulipClient.deleteMessage to perform the deletion, handling success/error responses.
    async ({ message_id }) => {
      try {
        await zulipClient.deleteMessage(message_id);
        return createSuccessResponse(`Message ${message_id} deleted successfully!`);
      } catch (error) {
        return createErrorResponse(`Error deleting message: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • src/server.ts:516-527 (registration)
    Registration of the 'delete-message' MCP tool with server.tool(), specifying name, description, input schema, and handler function.
      "delete-message",
      "Delete a message by its ID.",
      DeleteMessageSchema.shape,
      async ({ message_id }) => {
        try {
          await zulipClient.deleteMessage(message_id);
          return createSuccessResponse(`Message ${message_id} deleted successfully!`);
        } catch (error) {
          return createErrorResponse(`Error deleting message: ${error instanceof Error ? error.message : 'Unknown error'}`);
        }
      }
    );
  • Zod schema defining the input parameters for the delete-message tool: requires a numeric message_id.
    export const DeleteMessageSchema = z.object({
      message_id: z.number().describe("Unique ID of the message to delete")
    });
  • ZulipClient helper method that performs the actual HTTP DELETE request to Zulip API endpoint /messages/{messageId} to delete the message.
    async deleteMessage(messageId: number): Promise<void> {
      await this.client.delete(`/messages/${messageId}`);
    }
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 states the tool deletes a message, implying a destructive mutation, but doesn't mention whether deletion is permanent, reversible, requires specific permissions, or has side effects (e.g., affecting threads or notifications). This leaves significant gaps for a destructive operation.

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

Conciseness5/5

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

The description is a single, direct sentence with zero wasted words, making it highly efficient and front-loaded. It immediately conveys the core action without unnecessary elaboration, which is ideal for conciseness.

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 destructive tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., permanence, permissions), usage context versus siblings, and expected outcomes. Given the complexity of deletion operations, this minimal description doesn't provide enough context for safe and effective use.

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?

The schema description coverage is 100%, with the single parameter 'message_id' fully documented in the schema. The description adds no additional parameter semantics beyond implying the ID is used for deletion, which is already clear from the schema. With only one parameter, the baseline is high, but no extra value is provided.

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 action ('Delete') and resource ('a message by its ID'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'edit-message' or 'remove-emoji-reaction', which would require more specific context about when deletion versus editing is appropriate.

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 'remove-emoji-reaction', nor does it mention prerequisites such as needing permission to delete messages. It simply states what the tool does without contextual usage information.

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