Skip to main content
Glama
magarcia

Linear MCP Server

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
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Get teams' but doesn't specify whether this is a read-only operation, if it requires authentication, what the return format is, or if there are rate limits. For a tool with zero annotation coverage, this leaves significant behavioral aspects undocumented.

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 wasted words. It's front-loaded with the core purpose and appropriately sized for a simple retrieval tool.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'teams' means in this context, what data is returned, or how results are structured. For a tool with no structured output documentation, the description should provide more context about the return values.

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%, so the input schema fully documents both parameters (includeArchived and limit). The description adds no additional parameter information beyond what's already in the schema, which meets the baseline expectation when schema coverage is high.

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 'teams in the organization', making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'linear_get_team' (singular) or 'linear_get_projects', but the core action is unambiguous.

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 like 'linear_get_team' (singular) or other team-related operations. The description only states what it does, not when it's appropriate or what prerequisites might exist.

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