Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_notification_message

Send structured notifications to Slack channels with status indicators for success, warning, error, or info. Include a title, description, and optional details or thread replies for context.

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
descriptionYes
detailsNo
statusYes
thread_tsNo
titleYes

Implementation Reference

  • The main handler function for the 'send_notification_message' tool, decorated with @mcp.tool() for registration. It constructs a Slack block message with status emoji and color, sends it via SlackClient, and returns the JSON result or error.
    @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 type annotations and detailed docstring describing parameters and return type.
    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) """

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