Skip to content

Bug: update_issue status parameter passed directly as stateId without UUID resolution #27

@hwells4

Description

@hwells4

Bug Description

The linear_update_issue tool accepts a status parameter but passes it directly to the Linear API as stateId without resolving the status name to a UUID first.

Current Behavior

const updatePayload = await issue.update({
  title: args.title,
  description: args.description,
  priority: args.priority,
  stateId: args.status  // ← Bug: passes string directly
});

When calling:

update_issue(issueId: "xxx", status: "Done")

Results in:

Linear API error: Argument Validation Error - stateId must be a UUID.

Expected Behavior

The tool should either:

  1. Accept status names ("Done", "In Progress", etc.) and resolve them to UUIDs internally, OR
  2. Document that status requires a state UUID (not a name) and provide a way to get workflow state UUIDs

Reproduction Steps

  1. Call list_issues - returns issues with status as string ("Done", "Todo", etc.)
  2. Call update_issue with status: "Done"
  3. Receive UUID validation error

Suggested Fix

Add a lookup function to resolve state names to UUIDs:

async function resolveStateId(client: LinearClient, teamId: string, statusName: string): Promise<string> {
  const states = await client.workflowStates({ filter: { team: { id: { eq: teamId } } } });
  const state = states.nodes.find(s => s.name.toLowerCase() === statusName.toLowerCase());
  if (!state) throw new Error(`Unknown status: ${statusName}`);
  return state.id;
}

Then use it in the update handler:

const stateId = args.status ? await resolveStateId(client, issue.team.id, args.status) : undefined;

Environment

  • Linear MCP Server via Claude Code
  • Linear API returns proper error message indicating stateId must be UUID

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions