delete_work_item
Remove a work item from Azure DevOps by specifying its ID. This action permanently deletes the item from the project.
Instructions
Deletes a work item by its ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| work_item_id | Yes | The ID of the work item to delete. |
Implementation Reference
- mcp_azure_devops/server.py:920-926 (handler)MCP tool handler that dispatches the delete_work_item call to the AzureDevOpsClient and formats the success response.elif name == "delete_work_item": delete_result = self.client.delete_work_item(**arguments) return { "message": f"Work item {arguments['work_item_id']} has been deleted successfully.", "deleted_date": delete_result.deleted_date.isoformat() if delete_result.deleted_date else None, "deleted_by": delete_result.deleted_by.display_name if delete_result.deleted_by else None }
- mcp_azure_devops/server.py:161-175 (schema)Input schema and tool definition for delete_work_item, registered in the tools list.types.Tool( name="delete_work_item", description="Deletes a work item by its ID.", inputSchema={ "type": "object", "properties": { "work_item_id": { "type": "integer", "description": "The ID of the work item to delete." }, }, "required": ["work_item_id"], "additionalProperties": False } ),
- Client method that performs the actual deletion by calling the Azure DevOps Work Item Tracking client API.def delete_work_item(self, work_item_id): return self.work_item_tracking_client.delete_work_item(id=work_item_id)