Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

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

Implementation Reference

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

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