get_teams
Retrieve all teams from your Linear workspace to manage projects and assign tasks effectively.
Instructions
Get a list of teams in the Linear workspace
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:290-308 (handler)The main handler function for the 'get_teams' tool. Fetches all teams from the Linear workspace using the LinearClient, formats them into a simple object with id, name, key, and description, and returns the JSON stringified list as text content.private async handleGetTeams() { const teams = await linearClient.teams(); const formattedTeams = teams.nodes.map(team => ({ id: team.id, name: team.name, key: team.key, description: team.description, })); return { content: [ { type: 'text', text: JSON.stringify(formattedTeams, null, 2), }, ], }; }
- src/index.ts:92-99 (schema)The schema definition for the 'get_teams' tool, registered in the ListTools response. It has no input parameters.{ name: 'get_teams', description: 'Get a list of teams in the Linear workspace', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:118-119 (registration)The switch case that registers and dispatches to the 'get_teams' handler when the tool is called.case 'get_teams': return await this.handleGetTeams();