@tpmjs/tools-slack
Search for messages across a Slack workspace.
Test @tpmjs/tools-slack (searchMessages) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-slackpnpm add @tpmjs/tools-slackyarn add @tpmjs/tools-slackbun add @tpmjs/tools-slackdeno add npm:@tpmjs/tools-slackimport { searchMessages } from '@tpmjs/tools-slack';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { searchMessages } from '@tpmjs/tools-slack';
const result = await generateText({
model: openai('gpt-4o'),
tools: { searchMessages },
prompt: 'Your prompt here...',
});
console.log(result.text);(query: string, sort?: string, count?: number) => Promise<unknown>Available configuration options
querystringSearch query (supports operators like from:, in:, has:).
sortstringSort by: score (relevance) or timestamp (default: score).
countnumberNumber of results to return (1-100, default: 20).
Schema extracted: 2/26/2026, 4:21:07 AM
Slack API tools for AI agents. Send messages, manage channels, list users, search messages, upload files, and more.
npm install @tpmjs/tools-slack
Set the SLACK_BOT_TOKEN environment variable. Get your token from Slack API Apps.
Required bot scopes: chat:write, channels:read, channels:history, users:read, reactions:write, files:write, search:read.
import { sendMessage, listChannels } from '@tpmjs/tools-slack'; const result = await sendMessage.execute({ channel: '#general', text: 'Hello from AI!' }); const channels = await listChannels.execute({});
| Tool | Description |
|---|---|
| sendMessage | Send a message to a channel or thread |
| listChannels | List workspace channels by type |
| getChannel | Get channel details |
| listUsers | List workspace users |
| getUser | Get user profile details |
| addReaction | Add emoji reaction to a message |
| uploadFile | Upload a text file or snippet |
| setChannelTopic | Set a channel's topic |
| listMessages | Get recent messages from a channel |
| searchMessages | Search messages across the workspace |
MIT
Downloads/month
45
GitHub Stars
14
Quality Score