create_channel
Create new Slack channels for team communication by specifying a name and privacy setting to organize workspace discussions.
Instructions
Create a new Slack channel.
Args: name: Name for the new channel is_private: Whether the channel should be private
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| is_private | No |
Implementation Reference
- slack_mcp/server.py:457-472 (handler)The MCP tool handler for 'create_channel', decorated with @mcp.tool(). It instantiates SlackClient and delegates to its create_channel method, returning JSON response.@mcp.tool() async def create_channel(name: str, is_private: bool = False) -> str: """ Create a new Slack channel. Args: name: Name for the new channel is_private: Whether the channel should be private """ try: client = SlackClient() result = await client.create_channel(name, is_private) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- slack_mcp/server.py:191-195 (helper)SlackClient helper method that performs the actual Slack API call to create a channel using conversations.create endpoint.async def create_channel(self, name: str, is_private: bool = False) -> Dict[str, Any]: """Create a new channel.""" data = {"name": name, "is_private": is_private} return await self._make_request("POST", "conversations.create", json_data=data)
- slack_mcp/server.py:457-457 (registration)The @mcp.tool() decorator registers the create_channel function as an MCP tool.@mcp.tool()