Skip to main content
Glama

linear_getWorkflowStates

Retrieve workflow states for a Linear team to track issue progress and manage project workflows effectively.

Instructions

Get workflow states for a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesID of the team to get workflow states for
includeArchivedNoWhether to include archived states (default: false)

Implementation Reference

  • The handler function that implements the core logic for the 'linear_getWorkflowStates' tool. It validates the input arguments using the type guard and calls the LinearService to fetch workflow states for the given team.
    export function handleGetWorkflowStates(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isGetWorkflowStatesArgs(args)) {
            throw new Error('Invalid arguments for getWorkflowStates');
          }
    
          return await linearService.getWorkflowStates(args.teamId, args.includeArchived || false);
        } catch (error) {
          logError('Error getting workflow states', error);
          throw error;
        }
      };
    }
  • Defines the MCP tool schema for 'linear_getWorkflowStates', specifying input (teamId required, includeArchived optional) and output schema (array of workflow state objects).
    export const getWorkflowStatesToolDefinition: MCPToolDefinition = {
      name: 'linear_getWorkflowStates',
      description: 'Get workflow states for a team',
      input_schema: {
        type: 'object',
        properties: {
          teamId: {
            type: 'string',
            description: 'ID of the team to get workflow states for',
          },
          includeArchived: {
            type: 'boolean',
            description: 'Whether to include archived states (default: false)',
          },
        },
        required: ['teamId'],
      },
      output_schema: {
        type: 'array',
        items: {
          type: 'object',
          properties: {
            id: { type: 'string' },
            name: { type: 'string' },
            type: { type: 'string' },
            position: { type: 'number' },
            color: { type: 'string' },
            description: { type: 'string' },
          },
        },
      },
    };
  • Registers the tool handler 'handleGetWorkflowStates' for the name 'linear_getWorkflowStates' in the registerToolHandlers function.
    linear_getWorkflowStates: handleGetWorkflowStates(linearService),
  • Type guard helper function used in the handler to validate input arguments match the expected schema (teamId: string required, includeArchived?: boolean).
    export function isGetWorkflowStatesArgs(args: unknown): args is {
      teamId: string;
      includeArchived?: boolean;
    } {
      if (
        typeof args !== 'object' ||
        args === null ||
        !('teamId' in args) ||
        typeof (args as { teamId: string }).teamId !== 'string'
      ) {
        return false;
      }
    
      if (
        'includeArchived' in args &&
        typeof (args as { includeArchived: boolean }).includeArchived !== 'boolean'
      ) {
        return false;
      }
    
      return true;
    }
  • Imports the handleGetWorkflowStates handler function from team-handlers.ts for use in tool registration.
    import { handleGetTeams, handleGetWorkflowStates } from './team-handlers.js';
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. It states it 'gets' data (implying read-only), but doesn't disclose behavioral traits like pagination, rate limits, authentication needs, error conditions, or what 'workflow states' entail (e.g., statuses like 'Todo', 'In Progress'). For a read operation with zero annotation coverage, this is insufficient.

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 front-loaded with the core action and resource, making it easy to parse. No extraneous details or repetition.

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 no annotations, no output schema, and a read operation with potential complexity (workflow states may have nested data), the description is incomplete. It doesn't explain return values, error handling, or behavioral constraints. For a tool with 2 parameters and unclear output, this leaves significant gaps for the agent.

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 clear parameter documentation in the schema. The description adds no parameter semantics beyond implying a team context, which the schema already covers via teamId. Baseline 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate or add value.

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 ('workflow states for a team'), making the purpose understandable. It distinguishes this from siblings like linear_getTeams or linear_getProjects by specifying workflow states, but doesn't explicitly differentiate from other state-related tools (none exist in the sibling list).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing team access), when to use linear_getIssues instead for issue states, or any context about workflow states versus other team data. The agent must infer usage from the name alone.

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/tacticlaunch/mcp-linear'

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