Skip to main content
Glama
z9905080

MCP Server for Slack

by z9905080

slack_reply_to_thread

Post replies to specific message threads in Slack channels using channel ID, thread timestamp, and reply text.

Instructions

Reply to a specific message thread in Slack

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.
textYesThe reply text

Implementation Reference

  • Executes the slack_reply_to_thread tool by validating input arguments and invoking the SlackClient.postReply method to send the reply via Slack API.
    case "slack_reply_to_thread": {
      const args = request.params
        .arguments as unknown as ReplyToThreadArgs;
      if (!args.channel_id || !args.thread_ts || !args.text) {
        throw new Error(
          "Missing required arguments: channel_id, thread_ts, and text",
        );
      }
      const response = await slackClient.postReply(
        args.channel_id,
        args.thread_ts,
        args.text,
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the Tool object for slack_reply_to_thread, including name, description, and input schema with required parameters: channel_id, thread_ts, text.
    const replyToThreadTool: Tool = {
      name: "slack_reply_to_thread",
      description: "Reply to a specific message thread in Slack",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: {
            type: "string",
            description: "The ID of the channel containing the thread",
          },
          thread_ts: {
            type: "string",
            description: "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.",
          },
          text: {
            type: "string",
            description: "The reply text",
          },
        },
        required: ["channel_id", "thread_ts", "text"],
      },
    };
  • SlackClient method that makes the HTTP POST request to Slack's chat.postMessage API to reply to a thread, using the provided channel_id, thread_ts, and text.
    async postReply(
      channel_id: string,
      thread_ts: string,
      text: string,
    ): Promise<any> {
      const response = await fetch("https://slack.com/api/chat.postMessage", {
        method: "POST",
        headers: this.botHeaders,
        body: JSON.stringify({
          channel: channel_id,
          thread_ts: thread_ts,
          text: text,
        }),
      });
    
      return response.json();
    }
  • index.ts:567-582 (registration)
    Registers the slack_reply_to_thread tool (as replyToThreadTool) in the list of available tools returned by the ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.log("Received ListToolsRequest");
      return {
        tools: [
          listChannelsTool,
          postMessageTool,
          replyToThreadTool,
          addReactionTool,
          getChannelHistoryTool,
          getThreadRepliesTool,
          getUsersTool,
          getUserProfileTool,
          lookupUserByEmailTool,
        ],
      };
    });
  • TypeScript interface defining the input arguments for the slack_reply_to_thread tool, used for type checking in the handler.
    interface ReplyToThreadArgs {
      channel_id: string;
      thread_ts: string;
      text: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose whether this requires specific permissions, rate limits, how errors are handled, or what happens if the thread doesn't exist. For a mutation tool with zero annotation coverage, this is inadequate.

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

Conciseness5/5

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

The description is a single, focused sentence with no wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It lacks critical context about permissions, error conditions, response format, and differentiation from sibling tools, making it incomplete for safe and effective use by an AI agent.

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 the schema fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's already in the schema, maintaining the baseline score for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Reply to') and target ('a specific message thread in Slack'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'slack_post_message' or 'slack_add_reaction', which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'slack_post_message' (for new messages) or 'slack_add_reaction' (for reactions). It also doesn't mention prerequisites such as needing channel access or thread existence, leaving usage context unclear.

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

Install Server

Other Tools

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/z9905080/mcp-slack'

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