slack_get_thread_replies
Retrieve all replies from a Slack message thread by providing the channel ID and parent message timestamp.
Instructions
Get all replies in a message thread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | The ID of the channel containing the thread | |
| 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
- index.ts:177-189 (handler)Core handler function in SlackClient that fetches thread replies using Slack's conversations.replies API endpoint.async getThreadReplies(channel_id: string, thread_ts: string): Promise<any> { const params = new URLSearchParams({ channel: channel_id, ts: thread_ts, }); const response = await fetch( `https://slack.com/api/conversations.replies?${params}`, { headers: this.botHeaders }, ); return response.json(); }
- index.ts:322-338 (registration)MCP tool registration for 'slack_get_thread_replies', including Zod input schema and thin async handler that calls SlackClient.getThreadReplies.server.registerTool( "slack_get_thread_replies", { title: "Get Slack Thread Replies", description: "Get all replies in a message thread", inputSchema: { channel_id: z.string().describe("The ID of the channel containing the thread"), thread_ts: z.string().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."), }, }, async ({ channel_id, thread_ts }) => { const response = await slackClient.getThreadReplies(channel_id, thread_ts); return { content: [{ type: "text", text: JSON.stringify(response) }], }; } );
- index.ts:39-42 (schema)TypeScript interface defining input arguments for getThreadReplies method.interface GetThreadRepliesArgs { channel_id: string; thread_ts: string; }