Skip to main content
Glama
jar285

MCP-Discord

by jar285

discord_delete_forum_post

Remove unwanted forum posts or threads from Discord with an optional reason for moderation.

Instructions

Deletes a forum post or thread with an optional reason

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYes
reasonNo

Implementation Reference

  • Handler function that parses arguments using DeleteForumPostSchema, checks client readiness, fetches the thread by ID, verifies it's a thread, deletes it with optional reason, and returns success or error response.
    case "discord_delete_forum_post": {
      const { threadId, reason } = DeleteForumPostSchema.parse(args);
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in. Please use discord_login tool first." }],
            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 {
          content: [{ type: "text", text: `Failed to delete forum post: ${error}` }],
          isError: true
        };
      }
    }
  • Zod schema defining input parameters: threadId (required string), reason (optional string). Used for validation in the handler.
    const DeleteForumPostSchema = z.object({
        threadId: z.string(),
        reason: z.string().optional()
    });
  • src/index.ts:374-385 (registration)
    Tool registration in the listTools response, specifying name, description, and inputSchema matching the handler's expected arguments.
    {
      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"]
      }
    },
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 forum posts/threads, implying a destructive mutation, but doesn't mention whether this action is reversible, what permissions are required, or how it affects associated data (e.g., replies, reactions). The optional 'reason' hint is useful but insufficient for a mutation tool 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 extremely concise—a single sentence that efficiently conveys the core action and key parameter feature. Every word earns its place with no redundancy or fluff. It's front-loaded with the primary purpose, making it easy to scan and understand 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?

For a destructive mutation tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It lacks details on permissions, side effects, error conditions, return values, and parameter specifics. While concise, it doesn't provide enough context for safe and effective use, especially given the tool's potential impact.

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 description must compensate for undocumented parameters. It mentions 'threadId' implicitly by referring to forum posts/threads and notes the optional 'reason' parameter, providing basic semantic context. However, it doesn't explain what threadId represents (e.g., format, source), when reason is used, or any constraints, leaving significant gaps for both parameters.

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 unambiguous. It distinguishes from siblings like discord_delete_message by specifying forum posts/threads, though it doesn't explicitly contrast with discord_delete_channel or other deletion tools. The description is specific but could be more precise about what distinguishes it from similar tools.

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 discord_delete_message or discord_delete_channel. It mentions an optional 'reason' parameter but doesn't explain when providing a reason is appropriate or required. There's no context about prerequisites, permissions, or typical use cases for forum post deletion versus other deletion operations.

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

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