Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

invite_to_channel

Add users to a Slack channel by providing their IDs and the target channel ID for team collaboration.

Instructions

Invite users to a Slack channel.

Args: channel: Channel ID users: Comma-separated list of user IDs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
usersYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function that parses comma-separated users, creates SlackClient instance, calls the underlying invite_to_channel method, and returns JSON result or error.
    @mcp.tool()
    async def invite_to_channel(channel: str, users: str) -> str:
        """
        Invite users to a Slack channel.
    
        Args:
            channel: Channel ID
            users: Comma-separated list of user IDs
        """
        try:
            client = SlackClient()
            users_list = users.split(",")
            result = await client.invite_to_channel(channel, users_list)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
  • Helper method in SlackClient class that makes the actual Slack API POST request to conversations.invite endpoint with channel and comma-joined user IDs.
    async def invite_to_channel(self, channel: str, users: List[str]) -> Dict[str, Any]:
        """Invite users to a channel."""
        data = {"channel": channel, "users": ",".join(users)}
        return await self._make_request("POST", "conversations.invite", json_data=data)
  • Registration of the invite_to_channel tool using the @mcp.tool() decorator.
    @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 but offers minimal behavioral insight. It mentions the action 'invite' but doesn't disclose permissions required, rate limits, whether it's idempotent, or what happens if users are already members. This leaves significant gaps for an agent to understand the tool's behavior.

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 front-loaded with the core purpose in the first sentence, followed by a clear Args section. It's efficient with no wasted words, though the Args formatting could be slightly more integrated with the main text for better flow.

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 the tool has an output schema (which handles return values), 2 parameters with 0% schema coverage, and no annotations, the description is moderately complete. It covers the basics but lacks details on permissions, error cases, or integration with sibling tools, which would be helpful for a mutation tool in this context.

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%, so the description adds value by naming the two parameters and providing basic semantics: 'channel' as a Channel ID and 'users' as a comma-separated list of user IDs. However, it doesn't explain format details (e.g., Slack's ID conventions) or constraints, leaving room for improvement.

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 action ('Invite users') and target resource ('to a Slack channel'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'add_reaction' or 'create_channel' beyond the obvious domain difference, which keeps it from a perfect score.

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. For example, it doesn't mention prerequisites like needing channel admin permissions or clarify if it's for public/private channels. The description only states what it does, not when it's appropriate.

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