-
Notifications
You must be signed in to change notification settings - Fork 54
Bug: update_issue status parameter passed directly as stateId without UUID resolution #27
Copy link
Copy link
Open
Description
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:
- Accept status names ("Done", "In Progress", etc.) and resolve them to UUIDs internally, OR
- Document that
statusrequires a state UUID (not a name) and provide a way to get workflow state UUIDs
Reproduction Steps
- Call
list_issues- returns issues with status as string ("Done", "Todo", etc.) - Call
update_issuewithstatus: "Done" - 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels