Skip to main content

Overview

Before using this tool group, save an Azure DevOps connection as described in Azure DevOps. If connection_id is omitted, the tools use the effective default azure_devops connection for the current user (My default, then Role default). Actions that need a project use the explicit project parameter first and otherwise fall back to the connection’s saved default project. The PAT needs the Code (Read) scope; ado_list_security_alerts additionally needs Advanced Security (alerts read).

Tool Name

Purpose

The azure_devops_repos_tools group gives Genesis read access to Azure Repos: repository and branch inventory, file and directory reads by branch or commit, full-text and regex code search with line numbers and context snippets, commit details and diffs, filtered pull request listings with review threads and policy statuses, and Advanced Security alerts categorized across code, secret, and dependency scanning. This group is read-only. Cloning, committing, pushing, and creating or completing pull requests go through the existing git_action tool surface.

Key Features

Browse repositories and branches

List a project’s repositories with paging, and its branches with optional latest-commit metadata (author, date, ahead/behind counts).

Read files and directory trees

Fetch full file content up to 1 MB by branch or commit; larger, binary, and size-unknown files return a blob URL for download instead. List folders one level or recursively.

Search code by text or regex

Full-text search across a repo, project, or the whole org, plus regex scanning of one repository — both returning line numbers and surrounding context.

Inspect commits and diffs

Get commit details with changed files, compare any two commits or branches, and render per-file diffs as unified text, side-by-side rows, or raw before/after content.

Review pull requests

Filter PRs by state, author, reviewer, or branch; read review threads and completion state; check policy gates (build, reviewers) and merge conflicts.

Read Advanced Security alerts

List code-scanning, secret-scanning, and dependency alerts, categorized and filterable by state and severity.

Input Parameters for Each Function

Every function also accepts an optional connection_id (Azure DevOps connection name; the effective default connection is used when omitted) and an optional project (falls back to the connection’s default project).

ado_list_repos

Returns repositories and total_count (the full list length before paging).

ado_list_branches

ado_read_file

Files up to 1 MB return full inline content. Larger files, binary files, and files whose size the API cannot report return blob_url, size, over_size_limit, and when size was unavailable size_unknown instead of inline content.

ado_list_directory

ado_search_code

ado_get_commit

ado_get_commit_diff

ado_list_pull_requests

ado_get_pull_request_threads

Returns the PR summary (status, merge_status, is_draft, closed_date) plus every review thread with its status and comments.

ado_get_pull_request_policies

Returns one evaluation per configured policy (build, minimum reviewers, …) with its status, plus merge_status — conflicts means the PR cannot merge.

ado_list_security_alerts

Results come back as alerts_by_category with code, secret, and dependency lists plus per-category counts.

Usage Patterns

Code search examples

Each result carries line_number, the matched line, and a context snippet. Regex scanning is bounded by max_files_scanned and reports truncated: true when the tree is larger — narrow with path in that case.

PR filtering patterns

creator_id and reviewer_id take ADO identity GUIDs (from createdBy.id / reviewers[].id of a previous listing), not display names.

Error Handling and Throttling

Failures return success: false with an explicit error_type: auth (401 — bad or expired PAT), permission (403 — missing PAT scope), not_found (404 — wrong repo/path/commit), rate_limit (429 — the result carries retry_after_seconds from the ADO Retry-After header; wait that long before retrying), or api. Listings that page server-side return a continuation_token to pass into the next call.