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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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()
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. While 'Set' implies a mutation operation, it doesn't specify required permissions, rate limits, whether the change is reversible, or what happens if the purpose exceeds length limits. For a write operation with zero annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is appropriately sized with a clear main statement followed by parameter documentation. The two-sentence structure is efficient, though the Args section formatting could be more integrated with the main description text.

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 that there's an output schema (which handles return values), no annotations, and only 2 parameters, the description is minimally adequate. However, for a mutation tool that changes channel properties, it should provide more context about permissions, constraints, and how this differs from similar tools like set_channel_topic.

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

Parameters3/5

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

Schema description coverage is 0%, but the description explicitly documents both parameters ('channel' and 'purpose') with brief explanations. However, it doesn't provide format details (e.g., channel ID format, purpose text constraints) or examples that would help the agent use them correctly.

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 'Set' and the resource 'purpose for a Slack channel', making the tool's function immediately understandable. However, it doesn't differentiate from its sibling tool 'set_channel_topic', which performs a similar operation on a different channel attribute.

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?

The description provides no guidance on when to use this tool versus alternatives like 'set_channel_topic' or when channel purpose updates are appropriate. It lacks context about permissions, prerequisites, or typical use cases for setting channel purposes.

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