slack_reply_to_thread
Reply to a specific message thread in Slack by providing the channel ID, reply text, and parent message timestamp. Keeps all responses organized within the thread.
Instructions
Reply to a specific message thread in Slack
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | The ID of the channel containing the thread | |
| text | Yes | The reply text | |
| thread_ts | Yes | The timestamp of the parent message in the format '1234567890.123456'. Timestamps in the format without the period can be converted by adding the period such that 6 numbers come after it. |
Implementation Reference
- src/index.ts:219-236 (handler)Handler for the 'slack_reply_to_thread' tool. Parses ReplyToThreadRequestSchema, calls slackClient.chat.postMessage with channel_id, thread_ts, and text, then returns a success message.
case 'slack_reply_to_thread': { const args = ReplyToThreadRequestSchema.parse( request.params.arguments ); const response = await slackClient.chat.postMessage({ channel: args.channel_id, thread_ts: args.thread_ts, text: args.text, }); if (!response.ok) { throw new Error(`Failed to reply to thread: ${response.error}`); } return { content: [ { type: 'text', text: 'Reply sent to thread successfully' }, ], }; } - src/schemas.ts:204-217 (schema)Input schema (ReplyToThreadRequestSchema) for slack_reply_to_thread. Defines required fields: channel_id (string), text (string), and thread_ts (string, regex format '1234567890.123456').
export const ReplyToThreadRequestSchema = z.object({ channel_id: z .string() .describe('The ID of the channel containing the thread'), text: z.string().describe('The reply text'), thread_ts: z .string() .regex(/^\d{10}\.\d{6}$/, { message: "Timestamp must be in the format '1234567890.123456'", }) .describe( "The timestamp of the parent message in the format '1234567890.123456'. Timestamps in the format without the period can be converted by adding the period such that 6 numbers come after it." ), }); - src/index.ts:126-130 (registration)Tool registration entry for 'slack_reply_to_thread' in the ListToolsRequestSchema handler, providing name, description, and inputSchema.
{ name: 'slack_reply_to_thread', description: 'Reply to a specific message thread in Slack', inputSchema: zodToJsonSchema(ReplyToThreadRequestSchema), },