Skip to main content
Glama
magarcia

Linear MCP Server

linear_get_team

Retrieve detailed information about a specific team in Linear's issue tracking system by providing the team ID.

Instructions

Get details about a specific team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesTeam ID to get details for

Implementation Reference

  • The main ToolHandler function that fetches a specific Linear team by teamId, retrieves its states and members, and returns formatted JSON data or error.
    export const linearGetTeamHandler: ToolHandler = async args => {
      const params = args as {
        teamId: string;
      };
    
      try {
        // Validate required parameters
        if (!params.teamId) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: Team ID is required',
              },
            ],
            isError: true,
          };
        }
    
        // Get the team
        const team = await linearClient.team(params.teamId);
        if (!team) {
          return {
            content: [
              {
                type: 'text',
                text: `Error: Team with ID ${params.teamId} not found`,
              },
            ],
            isError: true,
          };
        }
    
        // Fetch team states (workflow)
        const states = await team.states();
    
        // Get team members
        const members = await team.members();
    
        // Extract team data
        const teamData = {
          id: await team.id,
          name: await team.name,
          key: await team.key,
          description: await team.description,
          color: await team.color,
          icon: await team.icon,
          private: await team.private,
          states:
            states && states.nodes
              ? await Promise.all(
                  states.nodes.map(async state => ({
                    id: await state.id,
                    name: await state.name,
                    color: await state.color,
                    type: await state.type,
                    position: await state.position,
                  }))
                )
              : [],
          members:
            members && members.nodes
              ? await Promise.all(
                  members.nodes.map(async member => {
                    try {
                      // Fetch the user directly using the memberId
                      const userId = await member.id;
                      if (userId) {
                        const user = await linearClient.user(userId);
                        return user
                          ? {
                              id: await user.id,
                              name: await user.name,
                              displayName: await user.displayName,
                              email: await user.email,
                            }
                          : null;
                      }
                      return null;
                    } catch (error) {
                      console.error('Error fetching team member:', error);
                      return null;
                    }
                  })
                ).then(results => results.filter(Boolean))
              : [],
          createdAt: await team.createdAt,
          updatedAt: await team.updatedAt,
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(teamData),
            },
          ],
        };
      } 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,
        };
      }
    };
  • Registers the 'linear_get_team' tool using registerTool, linking the handler and defining input schema.
    export const linearGetTeamTool = registerTool(
      {
        name: 'linear_get_team',
        description: 'Get details about a specific team',
        inputSchema: {
          type: 'object',
          properties: {
            teamId: {
              type: 'string',
              description: 'Team ID to get details for',
            },
          },
          required: ['teamId'],
        },
      },
      linearGetTeamHandler
    );
  • Input schema defining the required 'teamId' parameter for the tool.
    inputSchema: {
      type: 'object',
      properties: {
        teamId: {
          type: 'string',
          description: 'Team ID to get details for',
        },
      },
      required: ['teamId'],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Get details' but doesn't clarify if this is a read-only operation, what permissions are required, error handling, or response format. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized for a simple lookup tool and front-loaded with the core purpose, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate but lacks completeness. It doesn't address behavioral aspects like safety or response format, which are important for an agent to use it correctly despite the simple schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'teamId' well-documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., format examples or constraints), so it meets the baseline for high schema coverage without compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('details about a specific team'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'linear_get_teams' (plural) or 'linear_get_team_issues', which might cause confusion about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, when-not-to-use scenarios, or comparisons to sibling tools like 'linear_get_teams' or 'linear_get_team_issues', leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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