set_channel_purpose
Define or update the purpose of a Slack channel by specifying the channel ID and the new purpose text. Simplify channel management and ensure clarity for team collaboration.
Instructions
Set the purpose for a Slack channel.
Args: channel: Channel ID purpose: New purpose text
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| purpose | Yes |
Implementation Reference
- slack_mcp/server.py:541-556 (handler)MCP tool handler that sets the purpose of a Slack channel by instantiating SlackClient and calling its set_channel_purpose method, returning JSON result or error.@mcp.tool() async def set_channel_purpose(channel: str, purpose: str) -> str: """ Set the purpose for a Slack channel. Args: channel: Channel ID purpose: New purpose text """ try: client = SlackClient() result = await client.set_channel_purpose(channel, purpose) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- slack_mcp/server.py:216-219 (helper)SlackClient helper method that makes the POST request to Slack API endpoint conversations.setPurpose to set the channel purpose.async def set_channel_purpose(self, channel: str, purpose: str) -> Dict[str, Any]: """Set the purpose for a channel.""" data = {"channel": channel, "purpose": purpose} return await self._make_request("POST", "conversations.setPurpose", json_data=data)