Skip to main content
Glama

discord_create_forum_post

Create a new thread in a Discord Forum channel with title, content, and optional tags. Use this tool to organize discussions and share information in structured forum spaces.

Instructions

Creates a new post (thread) inside a Discord Forum channel.

Parameters:

  • channel_id (string, required) : Snowflake ID of the Forum channel. Right-click the channel in Discord → Copy Channel ID.

  • title (string, required) : Post subject line. Max 100 characters.

  • content (string, required) : Body of the first message. Max 2000 characters. Supports Discord markdown (bold, italic, code blocks, etc.)

  • tag_ids (string[], optional): Array of Forum tag snowflake IDs to label the post.

Returns: A confirmation string with the post title and a direct URL, e.g.: "Forum post created successfully.\nTitle: My Post\nURL: https://discord.com/channels/GUILD/THREAD"

Errors:

  • "Invalid input …" — Input failed validation (wrong types, values out of range).

  • HTTP 401 Unauthorized — DISCORD_BOT_TOKEN is missing or invalid.

  • HTTP 403 Forbidden — The bot does not have permission to post in this channel.

  • HTTP 404 Not Found — channel_id does not exist or is not a Forum channel.

  • HTTP 400 Bad Request — Malformed payload (e.g. tag IDs that do not exist in the forum).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYesDiscord Forum channel ID (right-click channel → Copy Channel ID)
titleYesPost subject / thread title (max 100 characters)
contentYesFirst message body — supports Discord markdown (max 2000 characters)
tag_idsNoOptional array of Forum tag snowflake IDs to apply to the post

Implementation Reference

  • The main handler function for discord_create_forum_post tool. Validates input using Zod schema, calls createForumThread helper, and returns a success message with the post URL.
    handler: async (input: unknown): Promise<string> => {
      const parseResult = CreateForumPostSchema.safeParse(input);
      if (!parseResult.success) {
        const issues = parseResult.error.issues
          .map((i) => `  - ${i.path.join('.')}: ${i.message}`)
          .join('\n');
        throw new Error(`Invalid input for discord_create_forum_post:\n${issues}`);
      }
    
      const { channel_id, title, content, tag_ids } = parseResult.data as CreateForumPostInput;
    
      const thread = await createForumThread({
        channelId: channel_id,
        title,
        content,
        tagIds: tag_ids,
      });
    
      const url = `https://discord.com/channels/${thread.guild_id}/${thread.id}`;
      return `Forum post created successfully.\nTitle: ${title}\nURL: ${url}`;
    },
  • Zod schema (CreateForumPostSchema) for runtime input validation. Defines channel_id, title, content, and optional tag_ids with validation rules.
    const CreateForumPostSchema = z.object({
      channel_id: z
        .string()
        .min(1, 'channel_id must not be empty')
        .describe('Discord Forum channel ID'),
      title: z
        .string()
        .min(1, 'title must not be empty')
        .max(100, 'title must be at most 100 characters')
        .describe('Thread title (post subject)'),
      content: z
        .string()
        .min(1, 'content must not be empty')
        .max(2000, 'content must be at most 2000 characters')
        .describe('Post body (supports Discord markdown)'),
      tag_ids: z
        .array(z.string())
        .optional()
        .describe('Optional array of Forum tag snowflake IDs to apply'),
    });
  • The createForumThread helper function that makes the actual Discord REST API POST request to create a forum thread.
    export async function createForumThread(
      params: CreateForumThreadParams,
    ): Promise<DiscordThread> {
      const { channelId, title, content, tagIds, autoArchiveDuration = 4320 } = params;
    
      const body: Record<string, unknown> = {
        name: title,
        message: { content },
        auto_archive_duration: autoArchiveDuration,
      };
    
      if (tagIds !== undefined && tagIds.length > 0) {
        body['applied_tags'] = tagIds;
      }
    
      return httpRequest<DiscordThread>(`${DISCORD_API_BASE}/channels/${channelId}/threads`, {
        method: 'POST',
        headers: buildDiscordHeaders(),
        body,
      });
    }
  • Registration point where discordCreateForumPostTool is imported and exported as part of the discordTools array.
    import { discordCreateForumPostTool } from './forum.js';
    
    /** All Discord-domain MCP tools. Consumed by src/tools/index.ts. */
    export const discordTools = [discordCreateForumPostTool];
Behavior4/5

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

With no annotations provided, the description carries full burden and does an excellent job disclosing behavioral traits. It explains authentication requirements (DISCORD_BOT_TOKEN), permission needs (403 Forbidden), error conditions, return format, and character limits. The only minor gap is lack of rate limit information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (Parameters, Returns, Errors) and front-loaded purpose statement. Some redundancy exists between description and schema, but overall the information is organized efficiently with no wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description provides excellent coverage of behavior, errors, and return format. The only gaps are rate limits and more detailed usage context, but it's substantially complete for the tool's complexity.

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%, so the schema already documents all parameters thoroughly. The description repeats parameter information but doesn't add meaningful semantic context beyond what's in the schema descriptions. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Creates a new post (thread)') and resource ('inside a Discord Forum channel'), with no sibling tools to differentiate from. It uses precise terminology like 'post (thread)' to clarify the Discord-specific concept.

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, prerequisites, or best practices. The description only states what the tool does without context about when it's appropriate or what other tools might exist for related tasks.

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/jachy-h/jachy-mcp-server'

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