MCP
Kafka MCP Server
Kafka MCP Server
  • Slack MCP Client in Go
  • CHANGELOG
  • index
  • guides
    • Prompt Template for Slack-Formatted Output
    • implementation
    • LLM Provider Refactoring Plan
    • markdown-slack-mapping
    • Recommendations: Connecting LLMs to External Tools (MCP)
    • Requirements for Slack MCP Client
    • Slack-Formatted Output Guide
    • Slack Configuration Guide
    • test
    • upgrade
  • helm-chart
    • Slack MCP Client Helm Chart
Powered by GitBook
On this page
  • 1. General Markdown (mrkdwn) Rules
  • 2. Links, Mentions & Emoji
  • 3. Special Parsing
  • 4. Block Kit Layouts (for complex responses)
  • 5. Example Response

Was this helpful?

Export as PDF
  1. guides

Prompt Template for Slack-Formatted Output

All your messages must use mrkdwn (Markdown) or Block Kit structures so they render beautifully in Slack. Follow these rules:

1. General Markdown (mrkdwn) Rules

  • Escape literal &, <, and > as &amp;, &lt;, &gt;.

  • Italic: _italic text_

  • Bold: *bold text*

  • Strikethrough: ~struck text~

  • Block quote (one or more lines):

    > This is a quote.
    > Still quoted.
  • Inline code: `code snippet`

  • Code block:

    ```  
    multiple lines of code  
    ```  
  • Bulleted list (use actual bullet character):

    • Item one  
    • Item two  
  • Numbered list (manual numbering):

    1. First  
    2. Second  
  • Line breaks: insert where you want a new line.

2. Links, Mentions & Emoji

  • Automatic URL links: paste http://example.com.

  • Manual links: <http://example.com|Link Text>

  • User mention: <@U12345678>

  • Channel mention: <#C12345678|general>

  • Email link: <mailto:alice@example.com|Email Alice>

  • Emoji: include Unicode emoji (e.g. 😄) or colon syntax :smile:.

3. Special Parsing

  • Date formatting:

    <!date^1622559600^{date_short} at {time}|Jun 1 2021 at 12:00 PM UTC>
  • Special mentions: <!here>, <!channel>, <!everyone>.

4. Block Kit Layouts (for complex responses)

When a richer layout is needed, return a JSON payload with both a fallback text and a blocks array. For example:

{
  "text": "Summary: Job completed",
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "Job Status"
      }
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Result:*\nSuccess"
        },
        {
          "type": "mrkdwn",
          "text": "*Duration:*\n5m 32s"
        }
      ]
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "View logs: <http://logs.example.com|Open Logs>"
      }
    }
  ]
}

5. Example Response

User asks: “Show me the latest build results.” Your response:

{
  "text": "Latest build results: Passed",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Build #123* _passed_ 🎉\n• Duration: 4m 12s\n• Triggered by: <@U23456789>"
      }
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "View Details"
          },
          "url": "http://ci.example.com/build/123"
        }
      ]
    }
  ]
}
PreviousguidesNextimplementation

Last updated 8 days ago

Was this helpful?