Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_announcement

Send formatted announcements to Slack channels, including a title, message, and optional details like author, timestamp, or thread replies. Simplify team communication with structured updates.

Instructions

Send a formatted announcement message.

Args: channel: Channel ID or name title: Announcement title message: Main announcement message author: Author name (optional) timestamp: Custom timestamp (optional) thread_ts: Thread timestamp for replies (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorNo
channelYes
messageYes
thread_tsNo
timestampNo
titleYes

Implementation Reference

  • The main handler function for the 'send_announcement' MCP tool. It is registered via the @mcp.tool() decorator. Constructs a Block Kit formatted announcement message with header, section, and context elements, then sends it using SlackClient.send_message.
    @mcp.tool() async def send_announcement( channel: str, title: str, message: str, author: Optional[str] = None, timestamp: Optional[str] = None, thread_ts: Optional[str] = None ) -> str: """ Send a formatted announcement message. Args: channel: Channel ID or name title: Announcement title message: Main announcement message author: Author name (optional) timestamp: Custom timestamp (optional) thread_ts: Thread timestamp for replies (optional) """ try: blocks = [ BlockKitBuilder.header(f"📢 {title}"), BlockKitBuilder.section(message) ] # Add context with author and timestamp context_elements = [] if author: context_elements.append(f"*By:* {author}") if timestamp: context_elements.append(f"*Date:* {timestamp}") else: context_elements.append(f"*Date:* {datetime.now().strftime('%Y-%m-%d %H:%M')}") if context_elements: blocks.append(BlockKitBuilder.context(context_elements)) fallback_text = f"📢 {title}: {message}" 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)

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