slack_post_message
Post messages to Slack channels to enable asynchronous communication, manage threads, and send task notifications between Claude and Slack users.
Instructions
Post a message to a Slack channel. Returns the message timestamp (ts) which can be used to read thread replies later.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | No | The Slack channel ID. Defaults to configured inbox channel. | |
| text | Yes | The message text to post. |
Implementation Reference
- src/index.js:349-387 (handler)The handler implementation for the `slack_post_message` tool.
case "slack_post_message": { const channelId = args.channel_id || DEFAULT_CHANNEL; const text = args.text; if (!channelId) { return { content: [ { type: "text", text: "Error: No channel ID provided and no default channel configured.", }, ], }; } const result = await slack.chat.postMessage({ channel: channelId, text: text, }); return { content: [ { type: "text", text: JSON.stringify( { success: true, channel: result.channel, ts: result.ts, message: result.message?.text, hint: "Use the 'ts' value with slack_read_thread or slack_wait_for_reply to monitor for responses.", }, null, 2 ), }, ], }; } - src/index.js:97-116 (schema)The tool schema definition for `slack_post_message` inside `ListToolsRequestSchema`.
{ name: "slack_post_message", description: "Post a message to a Slack channel. Returns the message timestamp (ts) which can be used to read thread replies later.", inputSchema: { type: "object", properties: { channel_id: { type: "string", description: "The Slack channel ID. Defaults to configured inbox channel.", }, text: { type: "string", description: "The message text to post.", }, }, required: ["text"], }, },