Add link_work_items MCP tool
What does this MR do and why?
Implements the link_work_items MCP tool to allow the Duo Planner Agent to create linked item relationships between work items directly via API, without requiring manual UI interaction or comment quick actions.
Related to #586331
Implementation
The tool executes the workItemAddLinkedItems GraphQL mutation. The source work item is identified by URL, project_id + work_item_iid, or group_id + work_item_iid. Target work items are passed as an array of global IDs (gid://gitlab/WorkItem/<id>, max 10).
In CE, only the relates_to link type is supported. On EE with the blocked_work_items feature licensed, blocks and blocked_by are also available; attempting to use them without the license returns a clear error.
The base service validation is also extended to produce human-readable error messages for maxItems and enum JSON Schema violations.
How to set up and validate locally
Test using MCP inspector with link_work_items.
MR acceptance checklist
- I have evaluated the MR acceptance checklist for this MR.