Skip to content

feat(messages): post text as Markdown by default - #31

Merged
yukukotani merged 1 commit into
mainfrom
feat/markdown-message-format
Nov 15, 2026
Merged

yukukotani merged 1 commit into
mainfrom
feat/markdown-message-format

Conversation

@yukukotani

Copy link
Copy Markdown
Contributor

One-way doors

Approving this PR accepts the choice made for each door below.

  • The slack_post_message and slack_reply_to_thread tool contract changes. Before, text went to Slack as text, so Slack read it as mrkdwn. Now text defaults to standard Markdown and goes to Slack as markdown_text. A client that still writes mrkdwn such as *bold* or <https://example.com|label> gets a different rendering unless it passes format: "slack_mrkdwn". I chose Markdown as the default because agents write standard Markdown by habit, and Slack now renders it.

Why

Agents write standard Markdown, but Slack read our text as mrkdwn. Headings, **bold**, and links came out as raw symbols. Slack's markdown_text field renders standard Markdown, so the server now sends text there by default.

What changed

  • slack_post_message and slack_reply_to_thread take a new format field: markdown (default) or slack_mrkdwn.
  • toSlackMessageBody in src/message-body.ts maps format to markdown_text or text.
  • Markdown text over 12,000 characters, Slack's limit for markdown_text, fails schema validation before the API call.

Scope

  • Covers the two tools that post messages.
  • Leaves out Block Kit and file uploads.

Blast Radius

Every caller of the two posting tools now gets Markdown rendering. Plain text renders the same either way. Text written in mrkdwn renders differently until the caller sets format: "slack_mrkdwn".

Verification

  • npm test: 20 tests pass, including 4 new ones for the default, the opt-out, the length limit, and the tool input schema.
  • npm run build and npm run lint pass.
  • Not run against a real workspace. How Slack renders the Markdown is unverified.

@yukukotani
yukukotani merged commit b44a1b3 into main Nov 15, 2026
1 check passed
@yukukotani
yukukotani deleted the feat/markdown-message-format branch November 15, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant