Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_announcement

Send formatted announcements to Slack channels with titles, messages, and optional author attribution for team communication.

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
channelYes
titleYes
messageYes
authorNo
timestampNo
thread_tsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The send_announcement tool handler, registered via @mcp.tool() decorator. Constructs Block Kit blocks for a formatted announcement including title, message, author, and timestamp, then sends via 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)
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. While 'send' implies a write/mutation operation, the description doesn't address important behavioral aspects: what permissions are required, whether the announcement is broadcast to all channel members, how formatting works, what happens if the channel doesn't exist, or what the response contains. For a mutation tool with zero annotation coverage, this is inadequate.

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 with the core purpose in the first sentence. The Args section is organized clearly with parameter names and brief explanations. While efficient, the tool name repetition in parameter descriptions ('Announcement title', 'Main announcement message') is slightly redundant but not excessive.

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 that this is a mutation tool with 6 parameters, 0% schema description coverage, no annotations, but with an output schema, the description is minimally adequate. The presence of an output schema means the description doesn't need to explain return values, but it should do more to explain behavioral aspects, usage context, and parameter details for a tool with this complexity and mutation 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 provides parameter names and basic descriptions in the Args section, but with 0% schema description coverage, it doesn't fully compensate. It explains what each parameter represents (e.g., 'Channel ID or name', 'Announcement title'), which adds value beyond the bare schema. However, it doesn't clarify format requirements (e.g., what timestamp format, what constitutes a valid channel name) or provide examples, leaving significant gaps for 6 parameters.

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 formatted announcement message.' This specifies the verb ('send') and resource ('formatted announcement message'), making it immediately understandable. However, it doesn't distinguish this from sibling tools like 'send_message' or 'send_formatted_message' - all of which involve sending messages with different formatting or purposes.

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 (send_message, send_formatted_message, send_notification_message, etc.), there's no indication of what makes an 'announcement' different or when this specific tool should be selected over other message-sending options.

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