Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

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

Implementation Reference

  • 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)
  • 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)
  • @mcp.tool() decorator registers the set_channel_purpose function as an MCP tool.
    @mcp.tool()

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