Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_form_message

Send interactive form messages in Slack with select menus. Specify channel, title, description, and options to gather user input efficiently. Supports thread replies for organized conversations.

Instructions

Send a form-like message with a select menu.

Args: channel: Channel ID or name title: Form title description: Form description select_options: JSON string of select options [{"text": "Option 1", "value": "opt1"}] select_placeholder: Placeholder text for select menu select_action_id: Action ID for the select menu thread_ts: Thread timestamp for replies (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
descriptionYes
select_action_idNoform_select
select_optionsYes
select_placeholderNoChoose an option
thread_tsNo
titleYes

Implementation Reference

  • The main handler function for the 'send_form_message' tool, decorated with @mcp.tool() for registration. It constructs a Slack Block Kit message with a header, description section, and interactive select menu from JSON options, then sends it via SlackClient.
    @mcp.tool() async def send_form_message( channel: str, title: str, description: str, select_options: str, select_placeholder: str = "Choose an option", select_action_id: str = "form_select", thread_ts: Optional[str] = None ) -> str: """ Send a form-like message with a select menu. Args: channel: Channel ID or name title: Form title description: Form description select_options: JSON string of select options [{"text": "Option 1", "value": "opt1"}] select_placeholder: Placeholder text for select menu select_action_id: Action ID for the select menu thread_ts: Thread timestamp for replies (optional) """ try: blocks = [ BlockKitBuilder.header(title), BlockKitBuilder.section(description) ] # Parse select options options = json.loads(select_options) select_menu = BlockKitBuilder.select_menu( placeholder=select_placeholder, action_id=select_action_id, options=options ) blocks.append(BlockKitBuilder.section_with_accessory( "Please make your selection:", select_menu )) fallback_text = f"{title}: {description}" 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