get_channels
Retrieve channel lists for specific Mattermost teams to organize workspace navigation and access team communication channels.
Instructions
특정 팀의 채널 목록을 가져옵니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_id | Yes | 팀 ID |
Implementation Reference
- src/index.ts:542-553 (handler)The main tool handler in the CallToolRequestSchema switch statement. It extracts team_id from arguments, calls client.getChannelsForTeam, and returns the channels as JSON text content.case "get_channels": { const teamId = args.team_id as string; const channels = await client.getChannelsForTeam(teamId); return { content: [ { type: "text", text: JSON.stringify(channels, null, 2), }, ], }; }
- src/index.ts:147-149 (helper)Core helper method in MattermostClient that makes the API request to fetch channels for a given team ID.async getChannelsForTeam(teamId: string) { return await this.request(`/users/me/teams/${teamId}/channels`); }
- src/index.ts:268-277 (schema)Input schema definition for the get_channels tool, specifying team_id as required string.inputSchema: { type: "object", properties: { team_id: { type: "string", description: "팀 ID", }, }, required: ["team_id"], },
- src/index.ts:266-278 (registration)Tool registration in the ListToolsRequestSchema response, including name, description, and input schema.name: "get_channels", description: "특정 팀의 채널 목록을 가져옵니다.", inputSchema: { type: "object", properties: { team_id: { type: "string", description: "팀 ID", }, }, required: ["team_id"], }, },