get_channel_info
Retrieve detailed information about a specific Slack channel using its channel ID to access metadata and configuration details.
Instructions
Get detailed information about a specific channel
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Channel ID (e.g., C1234567890) |
Implementation Reference
- src/tools/channels.ts:27-39 (handler)The main handler function that validates input using Zod schema and calls Slack's conversations.info API to fetch channel details.export async function getChannelInfo(client: SlackClientWrapper, args: unknown) { const params = getChannelInfoSchema.parse(args); return await client.safeCall(async () => { const result = await client.getClient().conversations.info({ channel: params.channel, }); return { channel: result.channel, }; }); }
- src/utils/validators.ts:18-20 (schema)Zod schema defining the input validation for the getChannelInfo tool, requiring a channel ID.export const getChannelInfoSchema = z.object({ channel: channelIdSchema, });
- src/index.ts:74-86 (registration)Registration of the get_channel_info tool in the MCP tools list, including name, description, and input schema for list_tools.name: 'get_channel_info', description: 'Get detailed information about a specific channel', inputSchema: { type: 'object', properties: { channel: { type: 'string', description: 'Channel ID (e.g., C1234567890)', }, }, required: ['channel'], }, },
- src/index.ts:416-416 (registration)Maps the tool name to its handler function in the call_tool request handler.get_channel_info: (args) => channelTools.getChannelInfo(slackClient, args),