Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

send_form_message

Send interactive form messages with select menus in Slack channels to collect user responses and streamline feedback gathering.

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
titleYes
descriptionYes
select_optionsYes
select_placeholderNoChoose an option
select_action_idNoform_select
thread_tsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The send_form_message tool handler function. It is registered via the @mcp.tool() decorator and implements sending a Slack message with a Block Kit form containing a select menu.
    @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)
  • BlockKitBuilder.select_menu method, a key helper used to create the interactive select menu element in the form message.
    def select_menu(placeholder: str, action_id: str, options: List[Dict[str, str]]) -> Dict[str, Any]:
        """Create a static select menu element."""
        return {
            "type": "static_select",
            "placeholder": {
                "type": "plain_text",
                "text": placeholder
            },
            "action_id": action_id,
            "options": [
                {
                    "text": {
                        "type": "plain_text",
                        "text": option["text"]
                    },
                    "value": option["value"]
                }
                for option in options
            ]
        }
    
    @staticmethod
    def section_with_accessory(text: str, accessory: Dict[str, Any], text_type: str = "mrkdwn") -> Dict[str, Any]:
  • BlockKitBuilder.section_with_accessory method, used to attach the select menu as an accessory to the section block.
    def section_with_accessory(text: str, accessory: Dict[str, Any], text_type: str = "mrkdwn") -> Dict[str, Any]:
        """Create a section block with an accessory element."""
        return {
            "type": "section",
            "text": {
                "type": text_type,
                "text": text
            },
            "accessory": accessory
        }
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. It states the tool sends a message but does not clarify if this is a read-only or mutative operation, what permissions are required, how errors are handled, or the expected response format. The description adds minimal behavioral context beyond the basic action.

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 parameter explanations are structured in a list format, making it easy to scan. While efficient, it could be slightly more concise by integrating the parameter details more seamlessly.

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 the complexity of a 7-parameter tool with no annotations and 0% schema description coverage, the description does well on parameters but lacks behavioral context. The presence of an output schema reduces the need to explain return values, but gaps remain in usage guidelines and transparency, making it adequate but incomplete.

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?

Schema description coverage is 0%, so the description must compensate. It provides clear semantics for all 7 parameters, explaining their purposes (e.g., 'Channel ID or name', 'Form title', 'JSON string of select options'), including defaults and optionality. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Send a form-like message with a select menu'), identifies the resource (a message in a channel), and distinguishes it from sibling tools like send_message, send_interactive_message, or send_formatted_message by specifying the form-like structure with a select menu.

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 like send_message or send_interactive_message. It lacks context about prerequisites, such as channel access or permissions, and does not mention any exclusions or specific use cases.

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