archive_channel
Archive inactive Slack channels using the channel ID to maintain workspace organization and reduce clutter. Simplifies channel management within Slack MCP Server.
Instructions
Archive a Slack channel.
Args: channel: Channel ID to archive
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes |
Implementation Reference
- slack_mcp/server.py:474-488 (handler)The MCP tool handler for 'archive_channel', decorated with @mcp.tool() which registers the tool and implements the execution logic by instantiating SlackClient and calling its archive_channel method.@mcp.tool() async def archive_channel(channel: str) -> str: """ Archive a Slack channel. Args: channel: Channel ID to archive """ try: client = SlackClient() result = await client.archive_channel(channel) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- slack_mcp/server.py:196-199 (helper)The underlying SlackClient method that performs the actual Slack API call to archive the channel using conversations.archive endpoint.async def archive_channel(self, channel: str) -> Dict[str, Any]: """Archive a channel.""" data = {"channel": channel} return await self._make_request("POST", "conversations.archive", json_data=data)