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
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| items | Yes | ||
| description | No | ||
| thread_ts | No |
Implementation Reference
- slack_mcp/server.py:849-890 (handler)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)
- slack_mcp/server.py:849-849 (registration)The @mcp.tool() decorator registers the send_list_message function as an MCP tool.@mcp.tool()
- slack_mcp/server.py:851-866 (schema)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) """