Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_getWorkflowStates

Retrieve workflow states for a Linear team to understand project statuses and manage issue progression.

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

  • Handler function that implements the core logic of the linear_getWorkflowStates tool. Validates arguments using type guard and delegates to LinearService.getWorkflowStates.
    /**
     * 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 specifying name, description, input_schema (teamId required, includeArchived optional boolean), and output_schema for 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" }
          }
        }
      }
    }; 
  • Registration of the linear_getWorkflowStates handler within the registerToolHandlers function's return object.
    linear_getTeams: handleGetTeams(linearService),
    linear_getWorkflowStates: handleGetWorkflowStates(linearService),
  • Type guard helper function used by the handler to validate input arguments for teamId (string, required) and includeArchived (boolean, optional).
     * 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;
    } 
  • Inclusion of the linear_getWorkflowStates tool definition in the allToolDefinitions array for overall tool registration.
    // Team tools
    getTeamsToolDefinition,
    getWorkflowStatesToolDefinition,
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 a read operation ('Get'), implying non-destructive behavior, but lacks details on permissions, rate limits, pagination, or error handling. For a tool with no 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 front-loaded with the core purpose, making it easy to parse quickly, though its brevity contributes to gaps in other dimensions like guidelines and transparency.

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 two parameters, the description is incomplete. It lacks information on return values (e.g., state list format), error cases, or operational context, making it inadequate for full agent understanding without external inference.

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 documentation for both parameters (teamId and includeArchived). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage without compensating 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 immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'linear_getTeams' or 'linear_getProjects', which also retrieve team-related data, leaving some ambiguity 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing team ID from 'linear_getTeams'), exclusions, or comparisons to similar tools like 'linear_getIssues' or 'linear_getProjects', 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/wkoutre/linear-mcp-server'

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