channels_forum_create_thread
Create a new forum (or media) thread with an initial message in one request.
When to use
Section titled “When to use”- Forum-channel onboarding flows; programmatic question/answer post creation.
When not to use
Section titled “When not to use”- Anchored thread on an existing message → use
messages_create_thread. - Plain text channels - Discord rejects.
Body shape
Section titled “Body shape”requires nested message (the initial post). At least one of message.content, message.embeds, or message.components must be present.
MCP call example
Section titled “MCP call example”{ "name": "channels_forum_create_thread", "arguments": { "channel_id": "123456789012345678", "name": "Example name", "message": { "content": "Hello from discord-mcp" } }}| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
channel_id | string | yes | pattern: ^\d{17,20}$ | Parent forum/media channel |
name | string | yes | min length: 1; max length: 100 | Thread (post) name (1-100 chars) |
auto_archive_duration | 60 | 1440 | 4320 | 10080 | no | Auto-archive after N minutes (60, 1440, 4320, or 10080) | |
rate_limit_per_user | integer | no | min: 0; max: 21600 | |
applied_tags | array<string> | no | Forum tag IDs to apply to the thread | |
message | object | yes | Initial forum post body. At least one of content/embeds/components required. | |
audit_reason | string | no | min length: 1; max length: 512 | Reason recorded in audit log (X-Audit-Log-Reason header) |
Complete input JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "channel_id": { "type": "string", "pattern": "^\\d{17,20}$", "description": "Parent forum/media channel" }, "name": { "type": "string", "minLength": 1, "maxLength": 100, "description": "Thread (post) name (1-100 chars)" }, "auto_archive_duration": { "description": "Auto-archive after N minutes (60, 1440, 4320, or 10080)", "anyOf": [ { "type": "number", "const": 60 }, { "type": "number", "const": 1440 }, { "type": "number", "const": 4320 }, { "type": "number", "const": 10080 } ] }, "rate_limit_per_user": { "type": "integer", "minimum": 0, "maximum": 21600 }, "applied_tags": { "description": "Forum tag IDs to apply to the thread", "type": "array", "items": { "type": "string" } }, "message": { "type": "object", "properties": { "content": { "type": "string", "maxLength": 4000 }, "embeds": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "components": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "attachments": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "flags": { "type": "integer" } }, "description": "Initial forum post body. At least one of content/embeds/components required." }, "audit_reason": { "description": "Reason recorded in audit log (X-Audit-Log-Reason header)", "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "channel_id", "name", "message" ]}Returns
Section titled “Returns”{thread_id, parent_id, message_id}.
Example structured result
Section titled “Example structured result”{ "thread_id": "123456789012345678", "parent_id": "123456789012345678", "message_id": "123456789012345678"}Output schema
Section titled “Output schema”| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
thread_id | string | yes | pattern: ^\d{17,20}$ | Discord channel ID (snowflake) |
parent_id | string | null | yes | ||
message_id | string | null | yes |
Complete output JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "thread_id": { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord channel ID (snowflake)" }, "parent_id": { "anyOf": [ { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord channel ID (snowflake)" }, { "type": "null" } ] }, "message_id": { "anyOf": [ { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord message ID" }, { "type": "null" } ] } }, "required": [ "thread_id", "parent_id", "message_id" ], "additionalProperties": false}Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | no |
| Open-world | yes |
| Confirmation required | no |
Access and common errors
Section titled “Access and common errors”- The
channelscategory must be enabled byMCP_CATEGORIESwhen an allowlist is set. - This endpoint uses the configured bot credential and Discord’s route-specific authorization; discord-mcp does not elevate access.
- An invalid credential returns a
401-class tool error. Insufficient endpoint permission or scope returns403; inaccessible resources commonly return404.
Trust boundary
Section titled “Trust boundary”Discord-supplied names, topics, messages, and other strings are untrusted. Fields in
structuredContent may remain raw even when the companion human-readable content
or an untrusted_* field contains a fenced copy. Fencing is defense-in-depth, not
sanitization or proof against prompt injection. Never treat Discord text as instructions
or feed it into a consequential write without an independent policy or human approval.
Source
Section titled “Source”packages/mcp-core/src/tools/channels/forum_create_thread.ts