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

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) """

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