Loading
Add parent_iid filter to MCP list_work_items tool
What does this MR do and why?
Adds a parent_iid filter to the MCP list_work_items tool so agents and MCP clients can list direct child work items of a parent issue or epic by IID within the specified project or group.
- Adds
parent_iid(type: 'integer') toListWorkItemsServiceinput schema. - Resolves the parent work item via
find_work_item_in_parent!inListWorkItemsTool#hierarchy_filtersand passeshierarchyFilters: { 'parentIds' => [parent.to_global_id.to_s] }to the GraphQL query. - Classifies
parent_iidinee/spec/lib/ai/tool_rules/governable_tools_container_spec.rbundernot_a_container. - Adds documentation for
parent_iidtodoc/user/model_context_protocol/mcp_server_tools.md.
Closes #635909 (closed)
How to set up and validate locally
- Run RSpec specs:
bundle exec rspec spec/services/mcp/tools/work_items/list_work_items_tool_spec.rb \
spec/services/mcp/tools/work_items/list_work_items_service_spec.rb \
ee/spec/lib/ai/tool_rules/governable_tools_container_spec.rb- Query
list_work_itemswithparent_iid: <iid>to confirm children filtering.
Edited by Pavan Kumar Sadashiv