Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

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
NameRequiredDescriptionDefault
channelYes
purposeYes

Implementation Reference

  • 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)
  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/piekstra/slack-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server