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"]
      }
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of disclosing behavior. It states the action but omits permissions required, potential failures (e.g., duplicate channel names), rate limits, or what the response contains. This is a significant gap for a mutation tool.

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, direct sentence with no waste. It is front-loaded with the primary action and resource, making it easy to scan.

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?

For a creation tool with no annotations and no output schema, the description is insufficient. It does not explain what the tool returns, any required permissions, or error conditions. While the tool is simple, the absence of these details leaves the agent without critical operational context.

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?

The input schema has 0% description coverage, and the description adds little beyond the schema. It mentions 'optional topic', but that is already evident from the 'required' array in the schema. No additional meaning is provided for guildId or channelName.

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

Purpose5/5

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

The description clearly states the tool creates a new text channel in a Discord server, using a specific verb ('creates') and resource ('text channel'). It distinguishes itself from sibling tools like discord_create_category by specifying the channel type.

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?

No guidance is provided about when to use this tool versus alternatives, nor does it mention any exclusions or prerequisites. The description only states what the tool does, not when to choose it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.