linear-mcp-server icon indicating copy to clipboard operation
linear-mcp-server copied to clipboard

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

Open hwells4 opened this issue 10 months ago • 1 comments

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

hwells4 avatar Jan 22 '26 23:01 hwells4

Note: I see this repo is deprecated in favor of the official Linear MCP at https://mcp.linear.app/sse. If this bug also exists there, please let me know where to report it. Thanks!

hwells4 avatar Jan 22 '26 23:01 hwells4