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):
-
GetSavedViewTool(fetch saved view metadata) - !226995 (merged) -
This MR -
GetSavedViewWorkItemsTool(fetch work items with filters) - Orchestrator service + tool registration
Key changes
- New
Mcp::Tools::WorkItems::GetSavedViewWorkItemsToolclass with aGetWorkItemsFullGraphQL 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/afterparams - 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
- Part of #592440
- Split from !226663 (closed)
- Implementation follows the MCP GraphQL Integration design document
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