Skip to main content
Glama

linear_get_teams

Retrieve team information from Linear's issue tracking system, including archived teams and configurable result limits for organizational management.

Instructions

Get teams in the organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeArchivedNoInclude archived teams
limitNoMaximum number of teams to return (default: 50)

Implementation Reference

  • The main execution handler for the linear_get_teams tool. Fetches teams from the Linear API, processes the response, and returns formatted JSON or error messages.
    export const linearGetTeamsHandler: ToolHandler = async () => { try { // Fetch teams using the Linear API const teamsResponse = await linearClient.teams(); if (!teamsResponse) { return { content: [ { type: 'text', text: 'Error: Failed to fetch teams', }, ], isError: true, }; } // Extract team data const teams = teamsResponse.nodes.map(team => ({ id: team.id, name: team.name, key: team.key, description: team.description || '', })); return { content: [ { type: 'text', text: JSON.stringify(teams), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : typeof error === 'string' ? error : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error: ${errorMessage}`, }, ], isError: true, }; } };
  • Input schema defining optional parameters for the tool: includeArchived (boolean) and limit (number).
    inputSchema: { type: 'object', properties: { includeArchived: { type: 'boolean', description: 'Include archived teams', }, limit: { type: 'number', description: 'Maximum number of teams to return (default: 50)', }, }, },
  • Registers the linear_get_teams tool with the registry, including name, description, input schema, and the handler function.
    export const linearGetTeamsTool = registerTool( { name: 'linear_get_teams', description: 'Get teams in the organization', inputSchema: { type: 'object', properties: { includeArchived: { type: 'boolean', description: 'Include archived teams', }, limit: { type: 'number', description: 'Maximum number of teams to return (default: 50)', }, }, }, }, linearGetTeamsHandler );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/magarcia/mcp-server-linearapp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server