Skip to main content
Glama
send-message.ts•1.18 kB
import type { SlackClient } from '../slack-client.js'; import type { SlackTool } from './index.js'; export function sendMessageTool(slackClient: SlackClient): SlackTool { return { name: 'slack_send_message', description: 'Send a message to a Slack channel or user', inputSchema: { type: 'object', properties: { channel: { type: 'string', description: 'Channel ID or name (e.g. #general) or user ID', }, text: { type: 'string', description: 'Message content to send', }, thread_ts: { type: 'string', description: 'Timestamp of the message to reply to (optional)', }, }, required: ['channel', 'text'], }, handler: async (args) => { const { channel, text, thread_ts } = args; const response = await slackClient.sendMessage({ channel, text, thread_ts, }); return { success: response.ok, message: response.ok ? 'Message sent successfully' : 'Failed to send message', timestamp: response.ts, channel: response.channel, }; }, }; }

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

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