create_text_channel
Add a text channel to a Discord server by specifying name, server ID, category, topic, and reason for organization.
Instructions
Create a new text channel in the specified server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| server_id | No | ||
| category_id | No | ||
| topic | No | ||
| reason | No |
Implementation Reference
- The core handler function that implements the logic for creating a text channel using Discord API.async def handle_create_text_channel(discord_client, arguments: Dict[str, Any]) -> List[TextContent]: """Create a new text channel""" guild = await discord_client.fetch_guild(int(arguments["server_id"])) kwargs = { "name": arguments["name"], "reason": "Channel created via MCP" } if "category_id" in arguments: category = guild.get_channel(int(arguments["category_id"])) if category: kwargs["category"] = category if "topic" in arguments: kwargs["topic"] = arguments["topic"] channel = await guild.create_text_channel(**kwargs) return [TextContent( type="text", text=f"Created text channel '#{channel.name}' (ID: {channel.id}) in {guild.name}" )]
- src/discord_mcp/integrated_server.py:725-751 (registration)Tool registration in list_tools() including name, description, and input schema for create_text_channel.Tool( name="create_text_channel", description="Create a new text channel", inputSchema={ "type": "object", "properties": { "server_id": { "type": "string", "description": "Discord server ID" }, "name": { "type": "string", "description": "Channel name" }, "category_id": { "type": "string", "description": "Optional category ID to place channel in" }, "topic": { "type": "string", "description": "Optional channel topic" } }, "required": ["server_id", "name"] } ),