Skip to main content
Glama
ubie-oss

Slack MCP Server

by ubie-oss

slack_get_thread_replies

Fetch all replies in a Slack thread using the channel ID and parent message timestamp, with optional pagination.

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.
cursorNoPagination cursor for next page of results
limitNoNumber of replies to retrieve (default 100)

Implementation Reference

  • Main handler for the slack_get_thread_replies tool. Parses request args using GetThreadRepliesRequestSchema, calls slackClient.conversations.replies() with channel_id, thread_ts, limit, and cursor, then parses and returns the response using ConversationsRepliesResponseSchema.
    case 'slack_get_thread_replies': {
      const args = GetThreadRepliesRequestSchema.parse(
        request.params.arguments
      );
      const response = await slackClient.conversations.replies({
        channel: args.channel_id,
        ts: args.thread_ts,
        limit: args.limit,
        cursor: args.cursor,
      });
      if (!response.ok) {
        throw new Error(`Failed to get thread replies: ${response.error}`);
      }
      const parsedResponse =
        ConversationsRepliesResponseSchema.parse(response);
      return {
        content: [{ type: 'text', text: JSON.stringify(parsedResponse) }],
      };
    }
  • Input schema for the slack_get_thread_replies tool. Defines the request structure with channel_id (string), thread_ts (string matching timestamp regex), cursor (optional string), and limit (optional integer, default 100).
    export const GetThreadRepliesRequestSchema = z.object({
      channel_id: z
        .string()
        .describe('The ID of the channel containing the thread'),
      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."
        ),
      cursor: z
        .string()
        .optional()
        .describe('Pagination cursor for next page of results'),
      limit: z
        .number()
        .int()
        .min(1)
        .max(1000)
        .optional()
        .default(100)
        .describe('Number of replies to retrieve (default 100)'),
    });
  • Response schema for the slack_get_thread_replies tool. Extends BaseResponseSchema with an optional array of messages using ConversationsHistoryMessageSchema.
    export const ConversationsRepliesResponseSchema = BaseResponseSchema.extend({
      messages: z.array(ConversationsHistoryMessageSchema).optional(),
    });
  • src/index.ts:142-146 (registration)
    Registers the slack_get_thread_replies tool with its name, description, and input schema (converted to JSON schema via zodToJsonSchema) in the list of available tools.
    {
      name: 'slack_get_thread_replies',
      description: 'Get all replies in a message thread',
      inputSchema: zodToJsonSchema(GetThreadRepliesRequestSchema),
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description should disclose behavioral traits but only restates the basic action. It omits pagination behavior, rate limits, or whether the parent message is included.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single-sentence description is concise and front-loaded with the action, but slightly too sparse to be excellent. It could include more detail without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 4 parameters and no output schema, but the description does not explain return value format, pagination handling, or any constraints. It is incomplete for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds no additional meaning beyond what the schema already provides for parameters like cursor and limit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get all replies in a message thread' clearly states the action (get) and the resource (replies in a thread), distinguishing it from sibling tools that handle channels, posting messages, or adding reactions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like slack_get_channel_history. It does not mention prerequisites or context for invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.