Skip to main content
Glama
ubie-oss

Slack MCP Server

by ubie-oss

slack_post_message

Post a message to a Slack channel using its channel ID and text content. Send notifications directly to any channel.

Instructions

Post a new message to a Slack channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYesThe ID of the channel to post to
textYesThe message text to post

Implementation Reference

  • The handler for 'slack_post_message' tool. Parses the request arguments with PostMessageRequestSchema, calls slackClient.chat.postMessage with channel_id and text, and returns a success message.
    case 'slack_post_message': {
      const args = PostMessageRequestSchema.parse(request.params.arguments);
      const response = await slackClient.chat.postMessage({
        channel: args.channel_id,
        text: args.text,
      });
      if (!response.ok) {
        throw new Error(`Failed to post message: ${response.error}`);
      }
      return {
        content: [{ type: 'text', text: 'Message posted successfully' }],
      };
    }
  • Zod schema defining the input for slack_post_message: channel_id (string) and text (string).
    export const PostMessageRequestSchema = z.object({
      channel_id: z.string().describe('The ID of the channel to post to'),
      text: z.string().describe('The message text to post'),
    });
  • src/index.ts:121-125 (registration)
    Registration of the 'slack_post_message' tool in the ListTools handler, including its description and input schema.
    {
      name: 'slack_post_message',
      description: 'Post a new message to a Slack channel',
      inputSchema: zodToJsonSchema(PostMessageRequestSchema),
    },
Behavior2/5

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

With no annotations, the description must fully disclose behavioral traits. It mentions 'Post' implying a write operation but omits details like authentication requirements, rate limits, or what happens if the channel ID is invalid. The description does not confirm whether the message is sent immediately or if there are formatting options.

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, clear sentence that efficiently communicates the core action. It is front-loaded with the verb and resource, containing no unnecessary words or redundancy.

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?

Given the lack of annotations and output schema, the description should provide more context about what the tool returns (e.g., message timestamp) and potential failure modes. It does not mention that the bot must be a member of the channel or that the message text supports formatting. The description feels incomplete for a tool with behavioral complexity.

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 covers both parameters with descriptions (channel_id and text), achieving 100% coverage. The description adds no extra meaning beyond the schema, so baseline 3 is appropriate. No additional context like where to obtain the channel ID or how to format the text is provided.

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 clearly states the tool's action ('Post a new message') and target resource ('a Slack channel'). It distinguishes from siblings like 'slack_reply_to_thread' (which posts to a thread) and 'slack_add_reaction' (adds a reaction), making the purpose unambiguous.

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 (e.g., 'slack_reply_to_thread' for threads, 'slack_get_channel_history' for reading messages). There is no mention of prerequisites, such as the bot needing to be a member of the channel.

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

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