Skip to main content
Glama
zencoderai

Slack

by zencoderai

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
NameRequiredDescriptionDefault
channel_idYesThe ID of the channel containing the thread
thread_tsYesThe 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

  • 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) }],
        };
      }
    );
  • TypeScript interface defining input arguments for getThreadReplies method.
    interface GetThreadRepliesArgs {
      channel_id: string;
      thread_ts: string;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zencoderai/slack-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server