Get work item
This skill always works with one specific work item ID.
- If the user provides an ID (for example: "for 115770" or "work item 115770"), use that ID directly.
- If the user does not provide an ID, prompt the user once to provide the work item ID.
- 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.
Tools
Use Azure DevOps MCP Server tools for all interactions with Azure DevOps.
wit_get_work_item: Get a work item from Azure DevOps by its ID.wit_list_work_item_comments: Get the list of comments for a work item by its ID.wit_get_work_items_batch_by_ids: Get work item details in batch by their IDs. Use this tool to get the details of linked work items, using the links returned fromwit_get_work_item.
Steps
- Call
wit_get_work_itemwithexpand=allfor the requested ID so that you retrieve fields, relations, and links in a single call. - If the work item has a parent (for example,
System.Parentor aSystem.LinkTypes.Hierarchy-Reverserelation), include the parent ID in the set of linked IDs to summarize. You do not need a separatewit_get_work_itemcall for the parent; instead, rely onwit_get_work_items_batch_by_idsin the next step. - From the work item
relationsarray, collect all linked work item IDs (parent, child, related, and any others). Callwit_get_work_items_batch_by_idsonce with that list of IDs to get the details of all linked work items. - Call
wit_list_work_item_commentsonce to get the comments for the original work item.
Display results
When displaying the results:
- 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. - Provide a Links table. For each linked work item, display: Group and order the rows in this sequence: Parent links first, then Child links, then Related links, then any other link types.
- Id as a clickable hyperlink in this exact format: [{ID}](https://dev.azure.com/{organization}/{project}/_workitems/edit/{ID}) - Link type (for example: Parent, Child, Related, or the underlying relation name) - Work item type - Title - State
- 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.
- 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.
- For comments:
- 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. - If there are no comments, explicitly state that there are no comments for this work item.