Skip to main content
Glama

linear_getWorkflowStates

Retrieve workflow states for a specific team in Linear, with options to include archived states, aiding in project management and task tracking.

Instructions

Get workflow states for a team

Input Schema

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

Implementation Reference

  • Handler function that implements the core logic for the linear_getWorkflowStates tool, including input validation via type guard and calling the Linear service.
    /** * Handler for getting workflow states for a 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; } }; }
  • MCP tool definition (schema) for linear_getWorkflowStates, specifying input and output schemas.
    /** * Tool definition for getting workflow states for a team */ 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' }, }, }, }, };
  • Registration of the linear_getWorkflowStates handler in the tool handlers map within registerToolHandlers function.
    // Team tools linear_getTeams: handleGetTeams(linearService), linear_getWorkflowStates: handleGetWorkflowStates(linearService),
  • Type guard helper function for validating input arguments to linear_getWorkflowStates tool.
    /** * Type guard for linear_getWorkflowStates tool arguments */ 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; }

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