Skip to main content
Glama

discord_create_forum_post

Create organized discussions in Discord forum channels by posting new topics with relevant tags to categorize conversations effectively.

Instructions

Creates a new post in a Discord forum channel with optional tags

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forumChannelIdYes
titleYes
contentYes
tagsNo

Implementation Reference

  • The core handler function that implements the discord_create_forum_post tool logic. It validates input with Zod, fetches the forum channel, handles tags, creates the thread/post, and returns success/error responses.
    export const createForumPostHandler: ToolHandler = async (args, { client }) => {
      const { forumChannelId, title, content, tags } =
        CreateForumPostSchema.parse(args);
    
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: 'text', text: 'Discord client not logged in.' }],
            isError: true,
          };
        }
    
        const channel = await client.channels.fetch(forumChannelId);
        if (!channel || channel.type !== ChannelType.GuildForum) {
          return {
            content: [
              {
                type: 'text',
                text: `Channel ID ${forumChannelId} is not a forum channel.`,
              },
            ],
            isError: true,
          };
        }
    
        const forumChannel = channel as ForumChannel;
    
        // Get available tags in the forum
        const availableTags = forumChannel.availableTags;
        let selectedTagIds: string[] = [];
    
        // If tags are provided, find their IDs
        if (tags && tags.length > 0) {
          selectedTagIds = availableTags
            .filter((tag) => tags.includes(tag.name))
            .map((tag) => tag.id);
        }
    
        // Create the forum post
        const thread = await forumChannel.threads.create({
          name: title,
          message: {
            content,
          },
          appliedTags: selectedTagIds.length > 0 ? selectedTagIds : undefined,
        });
    
        return {
          content: [
            {
              type: 'text',
              text: `Successfully created forum post "${title}" with ID: ${thread.id}`,
            },
          ],
        };
      } catch (error) {
        return handleDiscordError(error);
      }
    };
  • The JSON input schema definition for the tool, used by MCP for tool listing and validation.
    {
      name: 'discord_create_forum_post',
      description:
        'Creates a new post in a Discord forum channel with optional tags',
      inputSchema: {
        type: 'object',
        properties: {
          forumChannelId: { type: 'string' },
          title: { type: 'string' },
          content: { type: 'string' },
          tags: {
            type: 'array',
            items: { type: 'string' },
          },
        },
        required: ['forumChannelId', 'title', 'content'],
      },
  • src/server.ts:118-121 (registration)
    Registration and dispatch in the main server handler switch statement, calling the createForumPostHandler.
    case 'discord_create_forum_post':
      this.logClientState('before discord_create_forum_post handler');
      toolResponse = await createForumPostHandler(args, this.toolContext);
      return toolResponse;
  • src/server.ts:79-80 (registration)
    Tool list registration where the schema is provided to MCP clients.
    this.server.setRequestHandler(ListToolsRequestSchema, () => ({
      tools: toolList,
  • Zod schema for internal input validation in the handler.
    export const CreateForumPostSchema = z.object({
      forumChannelId: z.string(),
      title: z.string(),
      content: z.string(),
      tags: z.array(z.string()).optional(),
    });
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. It states the tool creates a post, implying a write operation, but lacks details on permissions required, rate limits, error conditions, or what the output looks like (since no output schema). This is a significant gap 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 a single, efficient sentence that front-loads the core action and includes the key optional feature. There is no wasted wording, and it's appropriately sized for the tool's complexity.

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 (a write operation with 4 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions or errors, and parameter details are sparse. This leaves significant gaps for an AI agent to use the tool effectively.

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. It mentions 'optional tags', which maps to one parameter (tags), but doesn't explain the other three parameters (forumChannelId, title, content) or their formats (e.g., ID structure, content length limits). This adds minimal value beyond the schema's property names.

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 ('creates a new post') and resource ('in a Discord forum channel'), with the optional feature of tags. It distinguishes from siblings like discord_send (general message) or discord_reply_to_forum (reply to existing post), though not explicitly named. However, it lacks specific differentiation from discord_create_text_channel (creates a channel vs. post), making it a 4 rather than 5.

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 forumChannelId from discord_get_forum_channels), exclusions (e.g., not for non-forum channels), or comparisons to siblings like discord_send (for regular messages). Usage is implied by the name but not explicitly stated.

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