archive_channel
Archive a Slack channel by providing its channel ID to remove it from active workspace view while preserving its history.
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)MCP tool handler function for archiving a Slack channel. Creates a SlackClient instance, calls its archive_channel method, and returns the JSON-formatted result or error.@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)SlackClient helper method that performs the actual Slack API call to archive the specified channel using the 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)
- slack_mcp/server.py:474-474 (registration)FastMCP tool registration decorator that registers the archive_channel function as an MCP tool.@mcp.tool()