Skip to main content
Glama
jar285

MCP-Discord

by jar285

discord_create_text_channel

Create a new text channel in a Discord server with an optional topic to organize discussions and manage community communication.

Instructions

Creates a new text channel in a Discord server with an optional topic

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYes
channelNameYes
topicNo

Implementation Reference

  • Handler for discord_create_text_channel: parses args with schema, fetches guild, creates text channel using guild.channels.create with name, type GuildText, and optional topic.
    case "discord_create_text_channel": {
      const { guildId, channelName, topic } = CreateTextChannelSchema.parse(args);
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in. Please use discord_login tool first." }],
            isError: true
          };
        }
    
        const guild = await client.guilds.fetch(guildId);
        if (!guild) {
          return {
            content: [{ type: "text", text: `Cannot find guild with ID: ${guildId}` }],
            isError: true
          };
        }
    
        // Create the text channel
        const channel = await guild.channels.create({
          name: channelName,
          type: ChannelType.GuildText,
          topic: topic
        });
    
        return {
          content: [{ 
            type: "text", 
            text: `Successfully created text channel "${channelName}" with ID: ${channel.id}` 
          }]
        };
      } catch (error) {
        return {
          content: [{ type: "text", text: `Failed to create text channel: ${error}` }],
          isError: true
        };
      }
    }
  • Zod schema defining input parameters for the tool: guildId (required string), channelName (required string), topic (optional string).
    const CreateTextChannelSchema = z.object({
        guildId: z.string(),
        channelName: z.string(),
        topic: z.string().optional()
    });
  • src/index.ts:278-290 (registration)
    Tool registration in the ListTools response, specifying name, description, and input schema matching the Zod schema.
    {
      name: "discord_create_text_channel",
      description: "Creates a new text channel in a Discord server with an optional topic",
      inputSchema: {
        type: "object",
        properties: {
          guildId: { type: "string" },
          channelName: { type: "string" },
          topic: { type: "string" }
        },
        required: ["guildId", "channelName"]
      }
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention required permissions, rate limits, whether the operation is idempotent, or what happens on failure (e.g., if guildId is invalid). This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action and includes the key optional feature. There is no wasted text, making it appropriately sized and easy to parse quickly.

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

Completeness2/5

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

Given the complexity of a mutation tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks details on permissions, error handling, return values, and parameter semantics, making it insufficient for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but only mentions 'optional topic' for one of three parameters. It doesn't explain guildId (server identifier), channelName (naming rules), or topic (purpose/content), leaving most parameter meanings undocumented and failing to add value beyond the bare schema.

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

Purpose4/5

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

The description clearly states the action ('creates') and resource ('new text channel in a Discord server') with an additional feature ('optional topic'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like discord_create_forum_post or discord_create_webhook, which also create Discord resources but for different channel types.

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?

The description provides no guidance on when to use this tool versus alternatives, such as discord_create_forum_post for forum channels or discord_create_webhook for webhooks. It also lacks prerequisites, like needing proper permissions or a valid guildId, leaving usage context unclear.

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

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