Skip to content

manage_pull_requests

Manage Azure DevOps pull requests. Supports 12 actions covering listing, creating, updating, commenting, voting, and managing reviewers and threads.

ActionDescriptionRequired ParamsOptional ParamsWrite
listList pull requests for a repositoryrepo_idproject_key, status, topNo
getGet pull request detailsrepo_id, pr_idproject_keyNo
createCreate a new pull requestrepo_id, title, source_branch, target_branchproject_key, description, is_draftYes
updateUpdate a pull requestrepo_id, pr_idproject_key, title, description, statusYes
add_commentAdd a general commentrepo_id, pr_id, commentproject_keyYes
list_commentsList all comment threadsrepo_id, pr_idproject_keyNo
voteSubmit a vote on a PRrepo_id, pr_id, reviewer_idproject_key, voteYes
list_reviewersList reviewers on a PRrepo_id, pr_idproject_keyNo
update_reviewersAdd or remove reviewersrepo_id, pr_id, reviewer_idsproject_key, statusYes
create_threadCreate a comment thread (optional inline)repo_id, pr_id, commentproject_key, file_path, lineYes
update_threadUpdate a thread statusrepo_id, pr_id, thread_id, statusproject_keyYes
reply_to_commentReply to a comment threadrepo_id, pr_id, thread_id, commentproject_keyYes
ParameterTypeDescription
actionstringRequired. The action to perform
project_keystringProject name
repo_idstringRepository name or ID (required for most actions)
pr_idintegerPull request ID (required for get, update, comments, vote, reviewers)
statusstringFilter by status: active, completed, abandoned, all (for list). Also used for update and update_reviewers (add/remove)
topintegerMax results to return
titlestringPR title (required for create)
descriptionstringPR description (for create, update)
source_branchstringSource branch name (required for create)
target_branchstringTarget branch name (required for create)
is_draftbooleanCreate as draft PR (for create)
commentstringComment content (for add_comment, create_thread, reply_to_comment)
reviewer_idstringReviewer ID (for vote)
voteintegerVote value: 10=approved, 5=approved with suggestions, 0=no vote, -5=waiting, -10=rejected
reviewer_idsstringComma-separated reviewer IDs (for update_reviewers)
thread_idintegerThread ID (for update_thread, reply_to_comment)
file_pathstringFile path for inline comment (for create_thread)
lineintegerLine number for inline comment (for create_thread)
{
"action": "list",
"project_key": "MyProject",
"repo_id": "backend-api",
"status": "active"
}
{
"action": "create",
"project_key": "MyProject",
"repo_id": "backend-api",
"title": "Add user authentication",
"description": "Implements OAuth2 login flow",
"source_branch": "feature/auth",
"target_branch": "main",
"is_draft": false
}
{
"action": "vote",
"project_key": "MyProject",
"repo_id": "backend-api",
"pr_id": 101,
"reviewer_id": "user-guid-here",
"vote": 10
}
{
"action": "create_thread",
"project_key": "MyProject",
"repo_id": "backend-api",
"pr_id": 101,
"comment": "Consider using a constant here instead of a magic number.",
"file_path": "/src/handlers/auth.go",
"line": 42
}
{
"action": "reply_to_comment",
"project_key": "MyProject",
"repo_id": "backend-api",
"pr_id": 101,
"thread_id": 5,
"comment": "Good point, I'll update this."
}