discord_create_thread
Create organized discussion threads in Discord channels to structure conversations around specific topics or messages.
Instructions
Create a thread from an existing message or as a standalone thread in a channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | ||
| name | Yes | Thread name. | |
| message_id | No | Optional: message to start the thread from. If omitted, creates a standalone thread. | |
| auto_archive_duration | No | Auto-archive after N minutes of inactivity (60, 1440, 4320, 10080). Default 1440 (24h). |
Implementation Reference
- src/tools/messages.ts:338-356 (handler)The handler implementation for 'discord_create_thread' which creates a thread from a message or as a standalone thread.
case "discord_create_thread": { const channel = await getTextChannel(args.channel_id as string); const duration = (args.auto_archive_duration as number) ?? 1440; if (args.message_id) { const msg = await channel.messages.fetch(args.message_id as string); const thread = await msg.startThread({ name: args.name as string, autoArchiveDuration: duration as 60 | 1440 | 4320 | 10080, }); return { content: [{ type: "text", text: `✅ Thread "${thread.name}" created from message (id: ${thread.id}).` }] }; } else { const thread = await channel.threads.create({ name: args.name as string, autoArchiveDuration: duration as 60 | 1440 | 4320 | 10080, type: ChannelType.PublicThread, }); return { content: [{ type: "text", text: `✅ Thread "${thread.name}" created (id: ${thread.id}).` }] }; } } - src/tools/messages.ts:70-83 (schema)The tool definition and input schema for 'discord_create_thread'.
{ name: "discord_create_thread", description: "Create a thread from an existing message or as a standalone thread in a channel.", inputSchema: { type: "object", properties: { channel_id: { type: "string" }, name: { type: "string", description: "Thread name." }, message_id: { type: "string", description: "Optional: message to start the thread from. If omitted, creates a standalone thread." }, auto_archive_duration: { type: "number", description: "Auto-archive after N minutes of inactivity (60, 1440, 4320, 10080). Default 1440 (24h)." }, }, required: ["channel_id", "name"], }, },