Skip to main content
Glama
wowjinxy
by wowjinxy

delete_channel

Remove a Discord channel from a server using its ID. Specify a reason for the deletion if needed.

Instructions

Delete a Discord channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
reasonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Executes the deletion of a Discord channel by fetching it via ID and calling delete() with optional reason, returning a formatted success message.
    async def handle_delete_channel(discord_client, arguments: Dict[str, Any]) -> List[TextContent]:
        """Delete a channel"""
        channel = await discord_client.fetch_channel(int(arguments["channel_id"]))
        channel_name = channel.name
        guild_name = channel.guild.name
        
        await channel.delete(reason=arguments.get("reason", "Channel deleted via MCP"))
        
        return [TextContent(
            type="text",
            text=f"Deleted channel '#{channel_name}' from {guild_name}"
        )]
  • Registers the delete_channel tool with the MCP application, defining its name, description, and input schema.
    Tool(
        name="delete_channel",
        description="Delete a channel",
        inputSchema={
            "type": "object",
            "properties": {
                "channel_id": {
                    "type": "string",
                    "description": "ID of channel to delete"
                },
                "reason": {
                    "type": "string",
                    "description": "Reason for deletion"
                }
            },
            "required": ["channel_id"]
        }
    ),
  • Routes tool calls for delete_channel and other core tools to their handler methods in the CoreToolHandlers class.
    core_tool_names = [
        "get_server_info", "list_servers", "get_channels", "list_members",
        "get_user_info", "send_message", "read_messages", "add_reaction",
        "add_multiple_reactions", "remove_reaction", "moderate_message",
        "create_text_channel", "delete_channel", "add_role", "remove_role"
    ]
    
    if name in core_tool_names:
        handler_method = f"handle_{name}"
        if hasattr(CoreToolHandlers, handler_method):
            return await getattr(CoreToolHandlers, handler_method)(discord_client, arguments)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Delete' implies a destructive, irreversible mutation, but the description doesn't explicitly state this, nor does it mention permissions needed, rate limits, or what the output contains. It lacks critical context for a destructive operation.

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, making it immediately understandable. Every word earns its place.

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 destructive tool with no annotations, 0% schema coverage, and an output schema (which helps but isn't described), the description is inadequate. It doesn't address safety concerns, permissions, or behavioral expectations beyond the basic action. More context is needed given the tool's complexity and risk.

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 0%, so the schema provides no parameter descriptions. The tool description doesn't mention parameters at all, failing to compensate for the coverage gap. However, with only 2 parameters (channel_id and reason), the names are somewhat self-explanatory, keeping it at a baseline 3 rather than lower.

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 'Delete a Discord channel' clearly states the action (delete) and the resource (Discord channel). It's specific and unambiguous about what the tool does. However, it doesn't differentiate from sibling tools like 'delete_role' or 'bulk_delete_messages' which also perform deletion operations on different resources.

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 (like required permissions), when deletion is appropriate versus other channel management tools like 'update_channel', or what happens after deletion. The agent must infer usage from the tool name alone.

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