get_teams
Retrieve all teams the current user belongs to in Mattermost for team management and access control.
Instructions
현재 사용자가 속한 모든 팀 목록을 가져옵니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:530-540 (handler)The main MCP tool handler for 'get_teams' in the CallToolRequestSchema switch statement. It calls client.getTeams() and returns the result as JSON text.case "get_teams": { const teams = await client.getTeams(); return { content: [ { type: "text", text: JSON.stringify(teams, null, 2), }, ], }; }
- src/index.ts:143-145 (helper)The MattermostClient method that fetches the current user's teams via the Mattermost API endpoint /users/me/teams. This is the core implementation logic invoked by the tool handler.async getTeams() { return await this.request("/users/me/teams"); }
- src/index.ts:257-264 (registration)Registration of the 'get_teams' tool in the listTools response, including name, description, and empty input schema.{ name: "get_teams", description: "현재 사용자가 속한 모든 팀 목록을 가져옵니다.", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:260-264 (schema)Input schema definition for the 'get_teams' tool, which requires no parameters.inputSchema: { type: "object", properties: {}, }, },