Home/Tools/@tpmjs/tools-slack

setChannelTopic

@tpmjs/tools-slack

Set the topic of a Slack channel.

Official
ops
v0.1.0
MIT

Interactive Playground

Test @tpmjs/tools-slack (setChannelTopic) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-slack
pnpm add @tpmjs/tools-slack
yarn add @tpmjs/tools-slack
bun add @tpmjs/tools-slack
deno add npm:@tpmjs/tools-slack

2. Import the tool

import { setChannelTopic } from '@tpmjs/tools-slack';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { setChannelTopic } from '@tpmjs/tools-slack';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { setChannelTopic },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(topic: string, channel: string) => Promise<unknown>

Tags

agent
channel
messaging
ops
slack
topic
tpmjs

Parameters

Available configuration options

Auto-extracted
channel
Required
Type: string

Channel ID.

topic
Required
Type: string

New topic text (max 250 characters).

Schema extracted: 3/1/2026, 4:28:23 AM

README

@tpmjs/tools-slack

Slack API tools for AI agents. Send messages, manage channels, list users, search messages, upload files, and more.

Installation

npm install @tpmjs/tools-slack

Setup

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.

Usage

import { sendMessage, listChannels } from '@tpmjs/tools-slack';

const result = await sendMessage.execute({ channel: '#general', text: 'Hello from AI!' });
const channels = await listChannels.execute({});

Tools

ToolDescription
sendMessageSend a message to a channel or thread
listChannelsList workspace channels by type
getChannelGet channel details
listUsersList workspace users
getUserGet user profile details
addReactionAdd emoji reaction to a message
uploadFileUpload a text file or snippet
setChannelTopicSet a channel's topic
listMessagesGet recent messages from a channel
searchMessagesSearch messages across the workspace

License

MIT

Statistics

Downloads/month

45

GitHub Stars

14

Quality Score

85%

Bundle Size

NPM Keywords

tpmjs
slack
messaging
ops
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai