set_channel_purpose
Update the purpose text for a Slack channel by specifying the channel ID and new purpose content.
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)Primary MCP tool handler decorated with @mcp.tool() for registration. Executes the tool logic by instantiating SlackClient and calling its set_channel_purpose method.@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 performs the actual Slack API call to conversations.setPurpose endpoint.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)
- slack_mcp/server.py:541-541 (registration)@mcp.tool() decorator registers the set_channel_purpose function as an MCP tool.@mcp.tool()