Skip to main content
Glama
AVIMBU

Slack MCP Server

by AVIMBU

slack_post_message

Send messages to Slack channels using channel IDs and text content to facilitate team communication.

Instructions

Post a new message to a Slack channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYesThe Channel ID to post the message to
textYesThe message text to post

Implementation Reference

  • Handler for the slack_post_message tool within the CallToolRequest switch statement. It validates the input arguments, calls slackClient.postMessage, and returns the JSON-stringified response.
    case "slack_post_message": {
      const args = request.params.arguments as unknown as PostMessageArgs;
      if (!args.channel_id || !args.text) {
        throw new Error("Missing required arguments: channel_id and text");
      }
      const response = await slackClient.postMessage(
        args.channel_id,
        args.text
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Tool definition including name, description, and input schema for slack_post_message.
    export const postMessageTool: Tool = {
      name: "slack_post_message",
      description: "Post a new message to a Slack channel",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: {
            type: "string",
            description: "The Channel ID to post the message to",
          },
          text: {
            type: "string",
            description: "The message text to post",
          },
        },
        required: ["channel_id", "text"],
      },
    };
  • src/index.ts:25-29 (registration)
    Registration of the slack_post_message tool (via postMessageTool) in the ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [getUsersTool, postMessageTool],
      };
    });
  • Core helper function in SlackClient that performs the HTTP POST to Slack's chat.postMessage API.
    async postMessage(channel_id: 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,
          text: text,
        }),
      });
    
      return response.json();
    }
  • TypeScript interface defining the input arguments for the slack_post_message tool.
    export interface PostMessageArgs {
      channel_id: 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 the full burden of behavioral disclosure. While 'Post a new message' implies a write operation, it doesn't mention authentication requirements, rate limits, error conditions, or what happens if the channel doesn't exist. This leaves significant behavioral gaps for a mutation tool.

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, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple tool and gets straight to the point.

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 doesn't explain what the tool returns, error conditions, authentication requirements, or any behavioral details beyond the basic action. Given the complexity of posting to Slack (which involves permissions, formatting, etc.), more context is needed.

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?

The input schema has 100% description coverage, with both parameters clearly documented in the schema. The description doesn't add any additional semantic context about the parameters beyond what's already in the schema, so it meets the baseline 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 ('Post a new message') and target resource ('to a Slack channel'), making the purpose immediately understandable. However, it doesn't differentiate from its sibling tool 'slack_get_users' beyond the obvious difference in function, which is why it doesn't reach 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 or any prerequisites for usage. It simply states what the tool does without context about appropriate scenarios or limitations.

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

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