Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_interactive_message

Send Slack messages with interactive buttons to collect user responses, trigger actions, or gather feedback directly in channels or threads.

Instructions

Send an interactive message with buttons.

Args: channel: Channel ID or name title: Message title description: Message description buttons: JSON string of button configurations [{"text": "Button Text", "action_id": "action_1", "style": "primary"}] thread_ts: Thread timestamp for replies (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
titleYes
descriptionYes
buttonsYes
thread_tsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'send_interactive_message' MCP tool. Decorated with @mcp.tool() for registration. Parses button JSON, builds interactive Block Kit blocks using BlockKitBuilder, and sends the message via SlackClient.
    @mcp.tool()
    async def send_interactive_message(
        channel: str,
        title: str,
        description: str,
        buttons: str,
        thread_ts: Optional[str] = None
    ) -> str:
        """
        Send an interactive message with buttons.
    
        Args:
            channel: Channel ID or name
            title: Message title
            description: Message description
            buttons: JSON string of button configurations [{"text": "Button Text", "action_id": "action_1", "style": "primary"}]
            thread_ts: Thread timestamp for replies (optional)
        """
        try:
            blocks = [
                BlockKitBuilder.header(title),
                BlockKitBuilder.section(description)
            ]
            
            # Parse button configurations
            button_configs = json.loads(buttons)
            button_elements = []
            
            for btn_config in button_configs:
                button = BlockKitBuilder.button(
                    text=btn_config["text"],
                    action_id=btn_config["action_id"],
                    value=btn_config.get("value"),
                    url=btn_config.get("url"),
                    style=btn_config.get("style")
                )
                button_elements.append(button)
            
            if button_elements:
                blocks.append(BlockKitBuilder.actions(*button_elements))
            
            fallback_text = f"{title}: {description}"
            
            client = SlackClient()
            result = await client.send_message(channel, fallback_text, thread_ts, blocks)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool sends a message with buttons, implying a write operation, but fails to address critical aspects such as required permissions, rate limits, error handling, or the interactive nature of the message (e.g., how button actions are handled). This leaves significant gaps in understanding 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 appropriately sized and front-loaded, starting with a clear purpose statement followed by a structured 'Args' section. Each sentence serves a purpose, with no redundant information. However, the formatting could be slightly improved for readability, such as using bullet points instead of a block of 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 the tool's complexity (5 parameters, no annotations, 0% schema coverage, but has an output schema), the description is moderately complete. It covers the basic purpose and parameters, but lacks usage guidelines, behavioral details, and output information. The presence of an output schema reduces the need to describe return values, but overall, the description is adequate with clear gaps for a tool of this nature.

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?

The description includes an 'Args' section that lists all parameters with brief explanations, adding meaning beyond the input schema, which has 0% description coverage. For example, it clarifies that 'buttons' is a 'JSON string of button configurations' with an example, and 'thread_ts' is for 'Thread timestamp for replies (optional)'. However, it lacks details on parameter formats (e.g., channel ID vs. name), constraints, or examples for other parameters, leaving some ambiguity.

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 tool's purpose: 'Send an interactive message with buttons.' This specifies the verb ('Send') and resource ('interactive message with buttons'), making it distinct from sibling tools like send_message or send_formatted_message. However, it doesn't explicitly differentiate from send_form_message or send_list_message, which might also involve interactive elements.

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 send_message, send_formatted_message, send_form_message, or send_list_message. It lacks context about appropriate scenarios, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name alone.

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