Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_list_message

Send formatted list messages to Slack channels with titles, items, and optional descriptions for organized communication.

Instructions

Send a formatted list message.

Args: channel: Channel ID or name title: List title items: Newline or comma-separated list items description: Optional description text thread_ts: Thread timestamp for replies (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
itemsYes
descriptionNo
thread_tsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The @mcp.tool()-decorated async function that defines and implements the 'send_list_message' MCP tool. It processes input parameters to build Slack Block Kit message blocks for a bulleted list and sends the message via SlackClient, returning the JSON result or error.
    @mcp.tool()
    async def send_list_message(
        channel: str,
        title: str,
        items: str,
        description: Optional[str] = None,
        thread_ts: Optional[str] = None
    ) -> str:
        """
        Send a formatted list message.
    
        Args:
            channel: Channel ID or name
            title: List title
            items: Newline or comma-separated list items
            description: Optional description text
            thread_ts: Thread timestamp for replies (optional)
        """
        try:
            blocks = [BlockKitBuilder.header(title)]
            
            if description:
                blocks.append(BlockKitBuilder.section(description))
                blocks.append(BlockKitBuilder.divider())
            
            # Process items
            if "\n" in items:
                item_list = [item.strip() for item in items.split("\n") if item.strip()]
            else:
                item_list = [item.strip() for item in items.split(",") if item.strip()]
            
            # Create formatted list
            formatted_items = "\n".join([f"• {item}" for item in item_list])
            blocks.append(BlockKitBuilder.section(formatted_items))
            
            fallback_text = f"{title}: {', '.join(item_list)}"
            
            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_list_message function as an MCP tool.
    @mcp.tool()
  • Input schema defined by type annotations and docstring Args description for the send_list_message tool.
        channel: str,
        title: str,
        items: str,
        description: Optional[str] = None,
        thread_ts: Optional[str] = None
    ) -> str:
        """
        Send a formatted list message.
    
        Args:
            channel: Channel ID or name
            title: List title
            items: Newline or comma-separated list items
            description: Optional description text
            thread_ts: Thread timestamp for replies (optional)
        """
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 the action 'send' but doesn't clarify permissions required, rate limits, whether it's idempotent, or what happens on failure. The output schema exists, but the description doesn't hint at return values or error conditions, leaving significant gaps for a mutation tool.

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 with a clear opening statement followed by parameter explanations. The Args section is structured but slightly redundant with the schema. Every sentence adds value, though the formatting could be more integrated with the main description for better flow.

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 4 parameters with 0% schema coverage and an output schema, the description provides good parameter semantics but lacks behavioral context for a mutation tool. It's adequate for basic use but doesn't cover permissions, errors, or sibling differentiation, leaving room for improvement in completeness.

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 adds meaningful context for all parameters beyond the 0% schema coverage. It explains that 'channel' can be an ID or name, 'items' can be newline or comma-separated, and 'thread_ts' is for replies. This compensates well for the lack of schema descriptions, though it doesn't detail format constraints like length limits.

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 verb 'send' and the resource 'formatted list message', making the purpose specific and understandable. It distinguishes itself from generic 'send_message' by specifying the list format, though it doesn't explicitly differentiate from other formatted message siblings like 'send_formatted_message' or 'send_announcement'.

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?

No guidance is provided on when to use this tool versus alternatives like 'send_message', 'send_formatted_message', or 'send_announcement'. The description lacks context about appropriate scenarios, prerequisites, or exclusions, leaving the agent to infer usage from 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