Skip to main content
Glama
wowjinxy
by wowjinxy

update_channel

Modify Discord channel settings including name, topic, category, permissions, and configuration parameters to organize and manage server communication.

Instructions

Update channel settings such as name, topic, and category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
nameNo
category_idNo
positionNo
topicNo
nsfwNo
slowmode_delayNo
user_limitNo
bitrateNo
reasonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler implementation for the MCP tool 'update_channel'. This FastMCP tool function fetches the Discord channel, constructs updates based on provided parameters (name, category, position, topic, nsfw, slowmode, user_limit, bitrate), validates applicability per channel type, and applies the changes via channel.edit().
    async def update_channel(
        channel_id: str | int,
        name: str | None = None,
        category_id: str | int | None = None,
        position: int | None = None,
        topic: str | None = None,
        nsfw: bool | str | int | None = None,
        slowmode_delay: int | None = None,
        user_limit: int | None = None,
        bitrate: int | None = None,
        reason: str | None = None,
        ctx: Context = None,
    ) -> str:  # type: ignore[override]
        """Update channel settings such as name, topic, and category."""
    
        assert ctx is not None
        bot, _ = await _acquire(ctx)
        channel = await _call_discord(
            "fetch channel", bot.fetch_channel(_require_int(channel_id, "channel_id"))
        )
    
        updates: dict[str, object] = {}
        if name is not None:
            new_name = name.strip()
            if not new_name:
                raise DiscordToolError("Channel name cannot be empty.")
            updates["name"] = new_name
    
        if position is not None:
            updates["position"] = int(position)
    
        if category_id is not None:
            if not hasattr(channel, "guild") or channel.guild is None:
                raise DiscordToolError("Cannot move a channel without an associated guild.")
            category = await _ensure_category(
                bot, channel.guild, _require_int(category_id, "category_id")
            )
            updates["category"] = category
    
        if topic is not None:
            if isinstance(channel, (discord.TextChannel, discord.StageChannel, discord.ForumChannel)):
                updates["topic"] = topic
            else:
                raise DiscordToolError("Only text, forum, or stage channels support topics.")
    
        if nsfw is not None:
            nsfw_value = _parse_optional_bool(nsfw, "nsfw")
            if isinstance(channel, (discord.TextChannel, discord.StageChannel, discord.ForumChannel)):
                updates["nsfw"] = nsfw_value
            else:
                raise DiscordToolError("NSFW can only be set on text, forum, or stage channels.")
    
        if slowmode_delay is not None:
            if isinstance(channel, discord.TextChannel):
                updates["slowmode_delay"] = max(0, min(int(slowmode_delay), 21600))
            else:
                raise DiscordToolError("Slowmode is only supported on text channels.")
    
        if user_limit is not None:
            if isinstance(channel, (discord.VoiceChannel, discord.StageChannel)):
                updates["user_limit"] = max(0, min(int(user_limit), 99))
            else:
                raise DiscordToolError("User limit can only be set on voice or stage channels.")
    
        if bitrate is not None:
            if isinstance(channel, (discord.VoiceChannel, discord.StageChannel)):
                bitrate_value = int(bitrate)
                max_bitrate = getattr(channel.guild, "bitrate_limit", 96000) or 96000
                updates["bitrate"] = max(8000, min(bitrate_value, max_bitrate))
            else:
                raise DiscordToolError("Bitrate can only be set on voice or stage channels.")
    
        if not updates:
            raise DiscordToolError("Provide at least one field to update.")
    
        await _call_discord("update channel", channel.edit(reason=reason, **updates))
        return f"Updated channel {channel.id}."
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'update' implies a mutation operation, the description doesn't specify what permissions are required, whether changes are reversible, what happens to unspecified settings, or what the response contains. For a mutation tool with 10 parameters and no annotation coverage, this is a significant gap in behavioral context.

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

Conciseness4/5

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

The description is a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a basic tool description, though it could benefit from being more comprehensive given the tool's complexity.

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 tool's complexity (10 parameters, mutation operation, no annotations), the description is inadequate. While an output schema exists (which helps with return values), the description doesn't address critical context like permission requirements, behavioral constraints, or parameter guidance. For a channel update tool in a Discord-like system, this leaves too many gaps for effective agent use.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 10 parameters have descriptions in the schema. The description only mentions three parameters ('name, topic, and category') out of 10, leaving 7 parameters completely undocumented. This fails to compensate for the poor schema coverage and provides minimal semantic value beyond the schema's property names.

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 ('update') and resource ('channel settings'), and provides specific examples of what can be updated ('name, topic, and category'). However, it doesn't explicitly differentiate this tool from potential sibling tools like 'edit_role' or 'create_text_channel', which might also modify channel-related properties.

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. There's no mention of prerequisites (e.g., needing admin permissions), when not to use it, or how it differs from sibling tools like 'delete_channel' or 'create_text_channel' for channel management tasks.

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

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