create_category
Organize Discord channels by creating new categories to group related channels together, improving server structure and navigation.
Instructions
Create a new channel category.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| server_id | No | ||
| position | No | ||
| reason | No |
Implementation Reference
- src/discord_mcp/server.py:919-941 (handler)The handler and registration for the MCP tool 'create_category', which creates a new Discord channel category using guild.create_category.async def create_category( name: str, server_id: str | int | None = None, position: int | None = None, reason: str | None = None, ctx: Context = None, ) -> str: # type: ignore[override] """Create a new channel category.""" assert ctx is not None bot, config = await _acquire(ctx) guild_id = _resolve_guild_id(config, server_id) guild = await _ensure_guild(bot, guild_id) kwargs: dict[str, object] = {"name": name} if position is not None: kwargs["position"] = int(position) category = await _call_discord( "create category", guild.create_category(reason=reason, **kwargs), ) return f"Created category {category.name} (ID: {category.id})."