Usage Examples
Sprint Planning
Section titled “Sprint Planning”View current sprint and its work items
Section titled “View current sprint and its work items”# Get the current iterationadtk iterations current -p MyProject
# List all work items in the current sprintadtk iterations list -p MyProjectVia MCP (AI agent)
Section titled “Via MCP (AI agent)”An AI agent can automate sprint planning:
Tool: manage_iterationsInput: { "action": "get_current", "project_key": "MyProject" }
Tool: manage_work_itemsInput: { "action": "iteration_items", "project_key": "MyProject", "iteration_id": "abc-123-def"}Create sprint tasks from a planning session
Section titled “Create sprint tasks from a planning session”export ADTK_ENABLE_WRITES=true
# Create multiple child tasks under a user story# Via MCP, an AI agent would use:Tool: manage_work_itemsInput: { "action": "add_children", "project_key": "MyProject", "parent_id": 100, "work_item_type": "Task", "titles": [ "Design API schema", "Implement backend endpoint", "Write unit tests", "Update API documentation" ]}Code Review Workflow
Section titled “Code Review Workflow”List active pull requests
Section titled “List active pull requests”adtk pull-requests list myrepo -p MyProject --status activeReview a specific PR
Section titled “Review a specific PR”# Get PR detailsadtk pull-requests get myrepo 42
# View comments/threadsadtk pull-requests comments myrepo 42
# List reviewersadtk pull-requests reviewers myrepo 42AI-assisted code review
Section titled “AI-assisted code review”An AI agent can review PRs and leave comments:
# Get the PRTool: manage_pull_requestsInput: { "action": "get", "repo_id": "myrepo", "pr_id": 42, "project_key": "MyProject" }
# Get the changed filesTool: manage_reposInput: { "action": "get_file", "repo_id": "myrepo", "file_path": "/src/main.go", "version": "feature-branch", "project_key": "MyProject" }
# Leave an inline commentTool: manage_pull_requestsInput: { "action": "create_thread", "repo_id": "myrepo", "pr_id": 42, "project_key": "MyProject", "comment": "Consider using a context parameter here for cancellation support.", "file_path": "/src/main.go", "line": 45}
# Approve the PRTool: manage_pull_requestsInput: { "action": "vote", "repo_id": "myrepo", "pr_id": 42, "project_key": "MyProject", "reviewer_id": "reviewer-guid", "vote": 10}Backlog Grooming with MCP
Section titled “Backlog Grooming with MCP”Find unestimated items in the backlog
Section titled “Find unestimated items in the backlog”Tool: manage_searchInput: { "action": "wiql", "query": "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.WorkItemType] = 'User Story' AND [System.State] = 'New' AND [Microsoft.VSTS.Scheduling.StoryPoints] = '' ORDER BY [Microsoft.VSTS.Common.Priority] ASC", "project_key": "MyProject"}Batch update priorities
Section titled “Batch update priorities”Tool: manage_work_itemsInput: { "action": "batch_update", "work_item_ids": [101, 102, 103], "priority": 2, "project_key": "MyProject"}Pipeline Monitoring
Section titled “Pipeline Monitoring”Check recent pipeline runs
Section titled “Check recent pipeline runs”# List pipelinesadtk pipelines list -p MyProject
# Get runs for a specific pipelineadtk pipelines runs 42 -p MyProject
# Get detailed logsadtk pipelines logs 42 --run 100 -p MyProjectAI-driven CI/CD debugging
Section titled “AI-driven CI/CD debugging”# List recent runsTool: manage_pipelinesInput: { "action": "list_runs", "pipeline_id": 42, "project_key": "MyProject", "top": 5 }
# Get a failed runTool: manage_pipelinesInput: { "action": "get_run", "pipeline_id": 42, "run_id": 100, "project_key": "MyProject" }
# Get the logs to diagnose the failureTool: manage_pipelinesInput: { "action": "get_logs", "pipeline_id": 42, "run_id": 100, "project_key": "MyProject" }
# Drill into a specific logTool: manage_pipelinesInput: { "action": "get_log", "pipeline_id": 42, "run_id": 100, "log_id": 3, "project_key": "MyProject" }Wiki Documentation
Section titled “Wiki Documentation”Browse and update wiki pages
Section titled “Browse and update wiki pages”# List wikisadtk wiki list -p MyProject
# Get a pageadtk wiki get ProjectWiki /Home -p MyProject
# List all pagesadtk wiki pages ProjectWiki -p MyProjectAI-generated documentation
Section titled “AI-generated documentation”# Read existing pageTool: manage_wikiInput: { "action": "get_page", "wiki_id": "ProjectWiki", "page_path": "/API/Endpoints", "project_key": "MyProject" }
# Update with new contentTool: manage_wikiInput: { "action": "update_page", "wiki_id": "ProjectWiki", "page_path": "/API/Endpoints", "content": "# API Endpoints\n\n## GET /users\n\nReturns a list of users...", "version": 5, "project_key": "MyProject"}Security Alert Triage
Section titled “Security Alert Triage”# List open security alertsTool: manage_advanced_securityInput: { "action": "list_alerts", "project_key": "MyProject", "repo_id": "myrepo", "states": "active"}
# Get details on a specific alertTool: manage_advanced_securityInput: { "action": "get_alert", "project_key": "MyProject", "repo_id": "myrepo", "alert_id": 7}Scripting with JSON Output
Section titled “Scripting with JSON Output”All CLI commands support --json for machine-readable output:
# Get all active bugs assigned to meadtk search wiql \ "SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active' AND [System.AssignedTo] = @Me" \ --json | jq '.[] | {id, title, state}'
# Export project list to CSVadtk projects list --json | jq -r '.[] | [.name, .id, .state] | @csv'