get_teams
Fetch a list of teams from your Linear workspace using the Linear MCP Server. Retrieve team details efficiently for workspace management and collaboration.
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. It 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 string 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 (registration)Registration of the 'get_teams' tool in the ListTools response, including name, description, and empty input schema (no parameters required).{ name: 'get_teams', description: 'Get a list of teams in the Linear workspace', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:95-98 (schema)Input schema definition for the 'get_teams' tool, specifying an empty object (no input parameters).inputSchema: { type: 'object', properties: {}, },
- src/index.ts:118-119 (handler)Dispatch case in the CallToolRequest handler that routes 'get_teams' calls to the handleGetTeams method.case 'get_teams': return await this.handleGetTeams();