slack_list_channels
Retrieve available Slack channel information to identify channel IDs for posting messages, managing threads, and handling files within asynchronous workflows.
Instructions
List available Slack channels. Use this to find channel IDs.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "slack_list_channels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| types | No | Channel types to include: public_channel, private_channel. Default: public_channel,private_channel |
Implementation Reference
- src/index.js:710-730 (handler)The handler implementation for slack_list_channels in the main switch statement.
case "slack_list_channels": { const types = args.types || "public_channel,private_channel"; const result = await slack.conversations.list({ types: types, exclude_archived: true, }); const channels = (result.channels || []).map((ch) => ({ id: ch.id, name: ch.name, is_private: ch.is_private, num_members: ch.num_members, })); return { content: [ { type: "text", text: JSON.stringify( { - src/index.js:227-242 (registration)The registration of slack_list_channels in the tools list.
{ name: "slack_list_channels", description: "List available Slack channels. Use this to find channel IDs.", inputSchema: { type: "object", properties: { types: { type: "string", description: "Channel types to include: public_channel, private_channel. Default: public_channel,private_channel", }, }, required: [], }, },