Skip to main content
Glama
drvova

Discord MCP Server

discord_delete_message

Delete Discord messages by specifying channel and message IDs to remove unwanted content or manage conversations.

Instructions

Delete a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
messageIdYesThe message ID to delete

Implementation Reference

  • The core handler function that executes the Discord message deletion logic. Validates parameters using DeleteMessageSchema and forwards to DiscordService.
    async deleteMessage(channelId: string, messageId: string): Promise<string> {
      const parsed = schemas.DeleteMessageSchema.parse({ channelId, messageId });
      return await this.discordService.deleteMessage(parsed.channelId, parsed.messageId);
    }
  • Zod validation schema defining the required inputs (channelId and messageId) for the discord_delete_message tool.
    export const DeleteMessageSchema = z.object({
      channelId: z.string().describe("Discord channel ID"),
      messageId: z.string().describe("Specific message ID")
    });
  • Dynamic registration/dispatch mechanism that maps tool names like 'discord_delete_message' to camelCase methods (e.g., 'deleteMessage') in AutomationManager.
    private async callAutomationMethod(action: string, params: any): Promise<string> {
      // Convert action name to method name (snake_case to camelCase)
      const methodName = action.replace(/_([a-z])/g, (g) => g[1].toUpperCase());
      
      // Check if method exists
      if (typeof (this.automationManager as any)[methodName] === 'function') {
        // Call the method with params
        return await (this.automationManager as any)[methodName](...Object.values(params));
      }
      
      throw new Error(`Method '${methodName}' not found in AutomationManager`);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Delete a message' implies a destructive, irreversible mutation, but lacks details on permissions required (e.g., bot vs. user rights), rate limits, error conditions (e.g., message not found), or side effects (e.g., audit logs). This is inadequate for a destructive operation with zero annotation coverage.

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. It's front-loaded with the core action, making it highly efficient. Every word earns its place by conveying the essential purpose without fluff.

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 doesn't address behavioral aspects like permissions, reversibility, or response format, leaving significant gaps for the agent to operate safely and effectively. More context is needed given the tool's complexity and lack of structured data.

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%, with clear descriptions for channelId and messageId. The description adds no parameter-specific information beyond what the schema provides (e.g., format examples, sourcing hints). Baseline 3 is appropriate since the schema does the heavy lifting, but no extra value is added.

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 'Delete a message' clearly states the verb (delete) and resource (a message), making the purpose immediately understandable. It distinguishes from siblings like discord_edit_message (modify) and discord_get_message (retrieve), but doesn't specify what type of message (e.g., user's own vs. others') or context beyond what's implied by the tool name.

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. It doesn't mention prerequisites (e.g., needing permissions), when not to use it (e.g., for bulk deletion), or refer to related tools like discord_edit_message for modification instead of deletion. The agent must infer usage from the tool name alone.

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/drvova/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server