Skip to main content
Glama

discord_create_channel

Create text, voice, or category channels in Discord servers to organize communication spaces for different topics or purposes.

Instructions

Create a text, voice channel or category in a guild.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
nameYes
typeNoDefaults to 'text'.
topicNo
category_idNo

Implementation Reference

  • The handler logic for 'discord_create_channel' which fetches the guild, determines the channel type, and creates the channel via the discord.js client.
    case "discord_create_channel": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const typeMap: Record<string, ChannelType> = {
        text: ChannelType.GuildText, voice: ChannelType.GuildVoice, category: ChannelType.GuildCategory,
      };
      const channelType = typeMap[(args.type as string) ?? "text"] ?? ChannelType.GuildText;
      const created = await guild.channels.create({
        name: args.name as string, type: channelType as ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.GuildCategory,
        topic: channelType === ChannelType.GuildText ? (args.topic as string | undefined) : undefined,
        parent: args.category_id as string | undefined,
      });
      return { content: [{ type: "text", text: `✅ Channel #${created.name} created (id: ${created.id}).` }] };
    }
  • The schema definition for 'discord_create_channel' outlining the required and optional arguments.
    {
      name: "discord_create_channel",
      description: "Create a text, voice channel or category in a guild.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          name: { type: "string" },
          type: { type: "string", enum: ["text", "voice", "category"], description: "Defaults to 'text'." },
          topic: { type: "string" },
          category_id: { type: "string" },
        },
        required: ["guild_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