Skip to main content
Glama

discord_delete_forum_post

Delete Discord forum posts or threads to remove unwanted content. Specify a thread ID and optional reason for moderation.

Instructions

Deletes a forum post or thread with an optional reason

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYes
reasonNo

Implementation Reference

  • The main handler function that executes the deletion of a Discord forum post/thread. Validates input, checks client readiness, fetches the thread, deletes it, and returns success or error response.
    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?.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);
      }
    };
  • Zod schema for input validation of the tool: requires threadId, optional reason.
    export const DeleteForumPostSchema = z.object({
      threadId: z.string(),
      reason: z.string().optional(),
    });
  • Tool definition in the toolList array used for list_tools endpoint, including name, description, and input schema.
    {
      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'],
      },
    },
  • src/server.ts:133-136 (registration)
    Dispatch registration in server.ts switch statement that routes tool calls to the deleteForumPostHandler.
    case 'discord_delete_forum_post':
      this.logClientState('before discord_delete_forum_post handler');
      toolResponse = await deleteForumPostHandler(args, this.toolContext);
      return toolResponse;
  • Re-export of forum tool handlers including deleteForumPostHandler for centralized import in server and transport.
      createForumPostHandler,
      deleteForumPostHandler,
      getForumChannelsHandler,
      getForumPostHandler,
      replyToForumHandler,
    } from './forum.js';
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 states the action is deletion, implying a destructive mutation, but doesn't cover critical aspects like whether deletion is permanent or reversible, what permissions are required, if there are rate limits, or what happens to associated content (e.g., replies). The optional 'reason' parameter hints at moderation use, but this isn't elaborated.

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 that front-loads the core action ('Deletes a forum post or thread') and includes the optional parameter detail. There is no wasted verbiage, and it's structured to convey essential information quickly.

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 complexity of a destructive operation with no annotations, 0% schema coverage, and no output schema, the description is inadequate. It doesn't address behavioral risks (e.g., permanence, permissions), parameter details beyond a brief mention, or expected outcomes. For a tool that deletes content, more context is needed to ensure safe and correct use.

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

Parameters2/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 mentions 'optional reason', which adds minimal semantics for one of the two parameters (reason), but doesn't explain threadId (e.g., what format it uses, where to find it) or provide context for the reason (e.g., who sees it). This fails to compensate for the low coverage.

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 target ('a forum post or thread'), making the purpose immediately understandable. It distinguishes the resource type from siblings like discord_delete_message (which deletes messages) and discord_delete_channel (which deletes channels). However, it doesn't explicitly differentiate from discord_delete_category or discord_delete_webhook, which target different resources, so it's not fully specific about sibling distinctions.

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), compare to similar tools like discord_delete_message, or indicate when deletion is appropriate (e.g., for moderation vs. cleanup). Without such context, 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/IQAIcom/mcp-discord'

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