Skip to main content
Glama
scarecr0w12

discord-mcp

modify_channel

Update Discord channel settings including name, topic, permissions, position, and slowmode to manage server organization and content.

Instructions

Modify channel settings (name, topic, permissions, position, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)
channelIdYesThe ID of the channel to modify
nameNoNew channel name
topicNoNew channel topic
nsfwNoWhether the channel is NSFW
parentIdNoNew parent category ID
positionNoNew channel position
rateLimitPerUserNoNew slowmode in seconds
bitrateNoNew bitrate (voice channels)
userLimitNoNew user limit (voice channels)
reasonNoReason for the modification

Implementation Reference

  • The handler function for the 'modify_channel' tool. It fetches the Discord guild and channel, constructs an updateData object from optional parameters (name, topic, nsfw, parentId, position, rateLimitPerUser, bitrate, userLimit, reason), edits the channel using channel.edit(updateData), and returns the updated channel info or error.
    server.tool(
      'modify_channel',
      'Modify channel settings (name, topic, permissions, position, etc.)',
      {
        guildId: z.string().describe('The ID of the server (guild)'),
        channelId: z.string().describe('The ID of the channel to modify'),
        name: z.string().optional().describe('New channel name'),
        topic: z.string().optional().describe('New channel topic'),
        nsfw: z.boolean().optional().describe('Whether the channel is NSFW'),
        parentId: z.string().optional().describe('New parent category ID'),
        position: z.number().optional().describe('New channel position'),
        rateLimitPerUser: z.number().optional().describe('New slowmode in seconds'),
        bitrate: z.number().optional().describe('New bitrate (voice channels)'),
        userLimit: z.number().optional().describe('New user limit (voice channels)'),
        reason: z.string().optional().describe('Reason for the modification'),
      },
      async ({ guildId, channelId, name, topic, nsfw, parentId, position, rateLimitPerUser, bitrate, userLimit, reason }) => {
        const result = await withErrorHandling(async () => {
          const client = await getDiscordClient();
          const guild = await client.guilds.fetch(guildId);
          const channel = await guild.channels.fetch(channelId);
          if (!channel) throw new Error('Channel not found');
    
          const updateData: Record<string, unknown> = {};
          if (name !== undefined) updateData.name = name;
          if (topic !== undefined) updateData.topic = topic;
          if (nsfw !== undefined) updateData.nsfw = nsfw;
          if (parentId !== undefined) updateData.parent = parentId;
          if (position !== undefined) updateData.position = position;
          if (rateLimitPerUser !== undefined) updateData.rateLimitPerUser = rateLimitPerUser;
          if (bitrate !== undefined) updateData.bitrate = bitrate;
          if (userLimit !== undefined) updateData.userLimit = userLimit;
          if (reason !== undefined) updateData.reason = reason;
    
          const updatedChannel = await channel.edit(updateData);
          return {
            id: updatedChannel.id,
            name: updatedChannel.name,
            type: ChannelType[updatedChannel.type],
            message: 'Channel updated successfully',
          };
        });
    
        if (!result.success) {
          return { content: [{ type: 'text', text: result.error }], isError: true };
        }
    
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • Zod schema defining the input parameters for the modify_channel tool.
    {
      guildId: z.string().describe('The ID of the server (guild)'),
      channelId: z.string().describe('The ID of the channel to modify'),
      name: z.string().optional().describe('New channel name'),
      topic: z.string().optional().describe('New channel topic'),
      nsfw: z.boolean().optional().describe('Whether the channel is NSFW'),
      parentId: z.string().optional().describe('New parent category ID'),
      position: z.number().optional().describe('New channel position'),
      rateLimitPerUser: z.number().optional().describe('New slowmode in seconds'),
      bitrate: z.number().optional().describe('New bitrate (voice channels)'),
      userLimit: z.number().optional().describe('New user limit (voice channels)'),
      reason: z.string().optional().describe('Reason for the modification'),
    },
  • src/index.ts:55-55 (registration)
    Call to registerChannelTools which includes the registration of the modify_channel tool.
    registerChannelTools(server);
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 offers minimal behavioral insight. It implies a mutation operation ('modify') but doesn't disclose critical traits like required permissions, whether changes are reversible, rate limits, or what happens to unspecified settings. The 'etc.' is vague and doesn't clarify scope beyond listed examples.

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 with zero wasted words. It's front-loaded with the core action and resource, followed by illustrative examples. Every element earns its place by clarifying scope without redundancy.

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 complex mutation tool with 11 parameters, no annotations, and no output schema, the description is inadequate. It lacks information on permissions, side effects, error conditions, and response format. The 'etc.' hints at more settings but doesn't specify them, leaving gaps in understanding the tool's full capabilities and limitations.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all 11 parameters. The description adds marginal value by listing examples of settings (name, topic, permissions, position) that map to some parameters, but doesn't provide additional syntax, constraints, or context beyond what the schema already specifies.

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 verb 'modify' and resource 'channel settings' with examples of what can be modified (name, topic, permissions, position, etc.). It distinguishes from obvious siblings like 'create_channel' and 'delete_channel' by focusing on updates, though it doesn't explicitly differentiate from other modification tools like 'modify_thread' or 'modify_server'.

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. It doesn't mention prerequisites (e.g., needing admin permissions), when not to use it (e.g., for minor edits vs. 'edit_message'), or refer to related tools like 'set_channel_permission' for permission-specific changes.

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

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