$npx -y skills add microsoft/azure-devops-skills --skill boards-work-item-summarySummarize a single Azure DevOps work item (and its links and comments) by ID.
| 1 | # Get work item |
| 2 | |
| 3 | This skill always works with **one specific work item ID**. |
| 4 | |
| 5 | - If the user **provides an ID** (for example: "for 115770" or "work item 115770"), use that ID directly. |
| 6 | - If the user **does not provide an ID**, prompt the user once to provide the work item ID. |
| 7 | - If the ID is **still not provided after prompting**, stop and return a clear message stating that a work item ID is required and do not call any tools. |
| 8 | |
| 9 | # Tools |
| 10 | |
| 11 | Use Azure DevOps MCP Server tools for all interactions with Azure DevOps. |
| 12 | |
| 13 | - `wit_work_item` (action: `get`): Get a work item from Azure DevOps by its ID. |
| 14 | - `wit_work_item` (action: `list_comments`): Get the list of comments for a work item by its ID. |
| 15 | - `wit_work_item` (action: `get_batch`): Get work item details in batch by their IDs. Use this tool to get the details of linked work items, using the links returned from `wit_work_item` with action `get`. |
| 16 | |
| 17 | # Steps |
| 18 | |
| 19 | 1. Call `wit_work_item` with action `get` and `expand=all` for the requested ID so that you retrieve fields, relations, and links in a single call. |
| 20 | |
| 21 | 2. If the work item has a parent (for example, `System.Parent` or a `System.LinkTypes.Hierarchy-Reverse` relation), include the parent ID in the set of linked IDs to summarize. You do **not** need a separate call; instead, rely on `wit_work_item` with action `get_batch` in the next step. |
| 22 | |
| 23 | 3. From the work item `relations` array, collect all linked work item IDs (parent, child, related, and any others). Call `wit_work_item` with action `get_batch` once with that list of IDs to get the details of all linked work items. |
| 24 | |
| 25 | 4. Call `wit_work_item` with action `list_comments` once to get the comments for the original work item. |
| 26 | |
| 27 | # Display results |
| 28 | |
| 29 | When displaying the results: |
| 30 | |
| 31 | - Show the following fields for the main work item: **Id**, **Title**, **State**, **Assigned To** (just the display name, not the email), **Work Item Type**, **Created Date** formatted as `MM/DD/YYYY`, **Priority**, and **Tags**. |
| 32 | |
| 33 | - Provide a **Links** table. For each linked work item, display: |
| 34 | - **Id** as a clickable hyperlink in this exact format: `[{ID}](https://dev.azure.com/{organization}/{project}/_workitems/edit/{ID})` |
| 35 | - **Link type** (for example: Parent, Child, Related, or the underlying relation name) |
| 36 | - **Work item type** |
| 37 | - **Title** |
| 38 | - **State** |
| 39 | |
| 40 | Group and order the rows in this sequence: **Parent links first**, then **Child links**, then **Related links**, then any **other link types**. |
| 41 | |
| 42 | - If there are pull requests linked to the work item (for example, via artifact links or specific PR relations), list them in a separate **Pull Requests** table with at least the PR ID, title, status, and a clickable link to the PR. |
| 43 | |
| 44 | - Provide a short, plain-language **summary** of the work item’s description, system information, and repro steps (if those fields exist). Focus on the key intent, scope, and any critical technical or repro details. |
| 45 | |
| 46 | - For **comments**: |
| 47 | - If there are one or more comments, state the **total number of comments** and give a brief overview of the main themes or decisions mentioned. |
| 48 | - If there are **no comments**, explicitly state that there are no comments for this work item. |