Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_notification_message

Send structured Slack notifications with status indicators to communicate updates, alerts, or information clearly within channels or threads.

Instructions

Send a structured notification message with status indicator.

Args: channel: Channel ID or name status: Status type (success, warning, error, info) title: Notification title description: Main description details: Additional details (optional) thread_ts: Thread timestamp for replies (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
statusYes
titleYes
descriptionYes
detailsNo
thread_tsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'send_notification_message' tool. It constructs a Block Kit message with a status emoji and color-coded notification, sends it to the specified Slack channel using SlackClient.send_message, and returns the API response as JSON.
    @mcp.tool()
    async def send_notification_message(
        channel: str,
        status: str,
        title: str,
        description: str,
        details: Optional[str] = None,
        thread_ts: Optional[str] = None
    ) -> str:
        """
        Send a structured notification message with status indicator.
    
        Args:
            channel: Channel ID or name
            status: Status type (success, warning, error, info)
            title: Notification title
            description: Main description
            details: Additional details (optional)
            thread_ts: Thread timestamp for replies (optional)
        """
        try:
            # Status emojis and colors
            status_config = {
                "success": {"emoji": "✅", "color": "#28a745"},
                "warning": {"emoji": "⚠️", "color": "#ffc107"},
                "error": {"emoji": "❌", "color": "#dc3545"},
                "info": {"emoji": "ℹ️", "color": "#17a2b8"}
            }
            
            config = status_config.get(status.lower(), status_config["info"])
            
            blocks = [
                {
                    "type": "section",
                    "text": {
                        "type": "mrkdwn",
                        "text": f"{config['emoji']} *{title}*\n{description}"
                    }
                }
            ]
            
            if details:
                blocks.append(BlockKitBuilder.divider())
                blocks.append(BlockKitBuilder.context([details]))
            
            fallback_text = f"{config['emoji']} {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)
  • The @mcp.tool() decorator registers the send_notification_message function as an MCP tool.
    @mcp.tool()
  • Input schema defined by function parameters and detailed in the docstring.
    """
    Send a structured notification message with status indicator.
    
    Args:
        channel: Channel ID or name
        status: Status type (success, warning, error, info)
        title: Notification title
        description: Main description
        details: Additional details (optional)
        thread_ts: Thread timestamp for replies (optional)
    """
  • SlackClient.send_message method used by the tool to post the notification to Slack API.
    async def send_message(
        self, channel: str, text: str, thread_ts: Optional[str] = None, blocks: Optional[List[Dict[str, Any]]] = None
    ) -> Dict[str, Any]:
        """Send a message to a channel."""
        data = {"channel": channel, "text": text}
    
        if thread_ts:
            data["thread_ts"] = thread_ts
    
        if blocks:
            data["blocks"] = blocks
    
        return await self._make_request("POST", "chat.postMessage", json_data=data)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions sending a notification with a status indicator, which implies a write operation, but doesn't cover critical aspects like permissions required, rate limits, whether the message is ephemeral or persistent, or how errors are handled. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 efficiently structured: a clear purpose statement followed by a bulleted list of parameters with concise explanations. Every sentence earns its place, and the information is front-loaded with the core functionality. No wasted words or redundancy.

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 moderate complexity (6 parameters, no annotations, but with an output schema), the description is partially complete. It covers parameters well but lacks behavioral context and usage guidelines. The presence of an output schema means the description doesn't need to explain return values, but it should address other gaps like when to use this tool versus siblings.

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 includes an 'Args' section that lists all 6 parameters with brief explanations, adding meaningful context beyond the input schema (which has 0% description coverage). It clarifies optional parameters (details, thread_ts) and provides examples for status values (success, warning, error, info). This compensates well for the lack of schema descriptions, though it could be more detailed on parameter formats or constraints.

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 a structured notification message with status indicator.' It specifies the verb ('send') and resource ('structured notification message'), and the mention of 'status indicator' adds useful detail. However, it doesn't explicitly differentiate this tool from similar sibling tools like send_message, send_formatted_message, or send_announcement, which prevents 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?

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools for sending messages (e.g., send_message, send_formatted_message, send_announcement), there's no indication of what makes this tool unique or when it's preferred. The description only lists parameters without contextual usage advice.

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