Add MCP GetSavedViewWorkItemsTool for filtered queries

What does this MR do and why?

Introduces GetSavedViewWorkItemsTool, a new MCP GraphQL tool that queries namespace.workItems with filters extracted from a saved view. This tool maps saved view filter keys to GraphQL query variables and applies hierarchy scoping defaults.

This is the second of three MRs that break down !226663 (closed):

  1. GetSavedViewTool (fetch saved view metadata) - !226995 (merged)
  2. This MR - GetSavedViewWorkItemsTool (fetch work items with filters)
  3. Orchestrator service + tool registration

Key changes

  • New Mcp::Tools::WorkItems::GetSavedViewWorkItemsTool class with a GetWorkItemsFull GraphQL query
  • Filter mapping from saved view keys to GraphQL variables (assignees, labels, milestones, state, types, confidential, negated/union filters)
  • Hierarchy scoping defaults (includeDescendants: true, excludeProjects: false, excludeGroupWorkItems: false)
  • Pagination support via first/after params
  • Work item response includes widgets (assignees, labels, milestone, dates, hierarchy)
  • Comprehensive unit and integration tests

Supported filter mapping

Saved View Filter GraphQL Variable
assigneeUsernames $assigneeUsernames
assigneeWildcardId $assigneeWildcardId
authorUsername $authorUsername
confidential $confidential
labelName $labelName
milestoneTitle $milestoneTitle
milestoneWildcardId $milestoneWildcardId
myReactionEmoji $myReactionEmoji
types $types
state $state
not $not
or $or

How to set up and validate locally

Unit tests have been added. UI tests will be shared in the third MR.

References

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Naman Jagdish Gala

Merge request reports

Loading