Skip to main content
Glama

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
NameRequiredDescriptionDefault
channel_idYes
nameYesThread name.
message_idNoOptional: message to start the thread from. If omitted, creates a standalone thread.
auto_archive_durationNoAuto-archive after N minutes of inactivity (60, 1440, 4320, 10080). Default 1440 (24h).

Implementation Reference

  • 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}).` }] };
      }
    }
  • 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"],
      },
    },

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

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