Skip to main content

Azure DevOps

The Azure DevOps connection gives agents controlled access to Azure DevOps projects, repositories, branches, files, diffs, and pull requests. Use it when an agent should inspect code, prepare documentation or release changes, open a branch for a proposed update, or help with pull-request workflow inside Azure DevOps.

When to Use It

Use Azure DevOps when an agent needs to:

  • search code across a project or repository,
  • list projects, repositories, branches, or pull requests,
  • read repository files or file segments,
  • compare two branches before documenting or reviewing a change,
  • create a branch, commit a file change, or open a pull request.

Setup

  1. In Connections, click on Add Integration.
  2. Select Azure DevOps.
  3. Create or use a Personal Access Token (PAT) in Azure DevOps with at least repository read access.
  4. Enter the Azure DevOps Organization URL such as https://dev.azure.com/your-org.
  5. Save the connection and assign it only to agents or workflows that should access repository content.

If the agent must write to repositories, use a PAT with the minimum Git write scope required for the target project.

What the Tool Can Do

Read and inspection operations:

  • search code with Azure DevOps code-search syntax,
  • list projects and repositories,
  • list repository branches,
  • list pull requests by repository or by project,
  • inspect pull request details, commits, and reviewers,
  • read a file or a line segment from a branch,
  • list files and folders in a repository path,
  • compare branch diffs.

Write-capable operations:

  • create a branch,
  • create, update, or delete repository files on a non-protected branch,
  • commit multiple file changes in one commit,
  • create or update a pull request.

Search and File Reading

The code search operation supports normal search text together with Azure DevOps-style filters such as:

  • proj:
  • repo:
  • path:
  • file:
  • ext:
  • class:
  • def:
  • comment:

Use file reads when the agent should quote or summarize a precise source file. Use file-segment reads when the file is large and the agent only needs a bounded part of it around a matching anchor line.

Use repository-path listing before a read when the agent is unsure about the exact folder or file name. Use diff inspection before documentation work so release notes or change summaries are based on the real branch delta rather than on a guessed commit range.

Branch and Pull Request Workflow

The safest write pattern is:

  1. List repositories and branches.
  2. Create or ensure a dedicated working branch.
  3. Read the target file or diff first.
  4. Upsert one file or commit several related file changes together.
  5. Create a pull request back to main, master, or the team’s integration branch.

This keeps agent-authored changes reviewable and avoids direct edits to protected branches.

Protected Branches and Confirmation

The released tool surface blocks direct commits to protected branch names such as:

  • main
  • master
  • release/*

Even when the PAT can write, keep Allowed with confirmation on write-capable Azure DevOps functions:

  • create branch,
  • upsert file,
  • delete file,
  • commit multiple files,
  • create or update pull request.

Ask the agent to show the intended diff, file content, or pull-request description before confirming a write. Read and inspection operations can usually stay enabled without confirmation if the repository audience is already approved for that codebase.

Example Usage

Compare main and feature/release-notes, summarize the changed files, then draft a pull request description.

Read /docs/api.md from the dev branch and show only the section around Authentication.

Technical Notes

  • Implementation: the connection exposes Azure DevOps repository, file, branch, diff, and pull-request operations.
  • Authentication/scopes: uses Azure DevOps PAT-based access against the configured organization URL. Project and repository permissions determine what the agent can read or modify.
  • Functions: code search, project/repository listing, branch listing, pull-request inspection, file reads, file listing, branch creation, file changes, multi-file commit, pull-request creation/update, and branch diff.
  • Write behavior: repository writes are real Git operations. Default to confirmation, prefer short-lived working branches, and treat pull requests as the normal merge path.