Skip to main content
Glama

discord_delete_forum_post

Remove a Discord forum post or thread by specifying the thread ID and an optional deletion reason. Part of the MCP-Discord server’s toolkit for managing forum interactions.

Instructions

Deletes a forum post or thread with an optional reason

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
threadIdYes

Implementation Reference

  • The core execution logic for the discord_delete_forum_post tool. Parses input arguments, validates Discord client readiness, fetches the target thread, and deletes it.
    export const deleteForumPostHandler: ToolHandler = async (args, { client }) => {
      const { threadId, reason } = DeleteForumPostSchema.parse(args);
      
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in." }],
            isError: true
          };
        }
    
        const thread = await client.channels.fetch(threadId);
        if (!thread || !thread.isThread()) {
          return {
            content: [{ type: "text", text: `Cannot find forum post/thread with ID: ${threadId}` }],
            isError: true
          };
        }
    
        // Delete the forum post/thread
        await thread.delete(reason || "Forum post deleted via API");
    
        return {
          content: [{ 
            type: "text", 
            text: `Successfully deleted forum post/thread with ID: ${threadId}` 
          }]
        };
      } catch (error) {
        return handleDiscordError(error);
      }
    }; 
  • MCP tool schema definition including name, description, and input schema for the discord_delete_forum_post tool.
    {
      name: "discord_delete_forum_post",
      description: "Deletes a forum post or thread with an optional reason",
      inputSchema: {
        type: "object",
        properties: {
          threadId: { type: "string" },
          reason: { type: "string" }
        },
        required: ["threadId"]
      }
  • Zod validation schema used within the handler to parse and validate input arguments.
    export const DeleteForumPostSchema = z.object({
        threadId: z.string(),
        reason: z.string().optional()
    });
  • src/server.ts:118-121 (registration)
    Switch case registration in the main server request handler that routes calls to discord_delete_forum_post to the deleteForumPostHandler function.
    case "discord_delete_forum_post":
      this.logClientState("before discord_delete_forum_post handler");
      toolResponse = await deleteForumPostHandler(args, this.toolContext);
      return toolResponse;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'optional reason' but fails to describe critical traits: whether deletion is permanent or reversible, permission requirements, rate limits, or what happens to replies/threads. For a destructive operation, this is a significant gap in transparency.

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, efficient sentence with zero wasted words. It front-loads the core action and resource, followed by an optional feature, making it easy to parse quickly. Every element earns its place.

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?

Given the tool's complexity (destructive operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It omits essential context: permission needs, irreversible effects, error conditions, and return values. This leaves the agent under-informed for safe and effective use.

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 0%, so the schema provides no parameter details. The description adds minimal semantics by naming 'threadId' and 'reason' implicitly, but it doesn't explain their formats, constraints, or effects (e.g., what 'reason' is used for). It partially compensates for the coverage gap but not fully, warranting a 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 action ('Deletes') and resource ('a forum post or thread'), making the purpose unambiguous. It distinguishes from siblings like discord_delete_message by specifying the resource type, though it could be more explicit about the distinction (e.g., 'forum post' vs. 'message').

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention prerequisites (e.g., needing permissions), differences from discord_delete_message (for non-forum messages), or when deletion is appropriate versus editing. This leaves the agent without contextual usage cues.

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

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

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