Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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)
  • 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)
  • FastMCP tool registration decorator that registers the archive_channel function as an MCP tool.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Archive') but doesn't describe what archiving entails (e.g., makes channel read-only, hides from lists), permission requirements, whether it's reversible (though 'unarchive_channel' sibling implies it is), or any rate limits/constraints. This leaves significant behavioral gaps for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with zero wasted words. It front-loads the core purpose in the first sentence and provides parameter clarification in a clean 'Args:' section. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a destructive operation with no annotations, the description is minimally complete but has significant gaps. The presence of an output schema means return values don't need explanation, but the description should address behavioral aspects like permissions, consequences, and reversibility for a channel archiving tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds crucial semantic context for the single parameter: 'channel' is clarified as 'Channel ID to archive'. With 0% schema description coverage and only one parameter, this adequately compensates by specifying what the parameter represents, though it doesn't explain format requirements (e.g., Slack channel ID format like C123456).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Archive') and resource ('a Slack channel'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'unarchive_channel' beyond the obvious semantic opposition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. While 'unarchive_channel' is clearly the opposite operation, there's no mention of prerequisites (e.g., channel must be active), consequences (e.g., archived channels become read-only), or when archiving is appropriate versus deleting or other channel management options.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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