Skip to main content
Glama
Azure DevOps MCP Server

Azure DevOps MCP Server

list_branches

Read-onlyIdempotent

Lists Git repository branches with prefix or substring filters, author scope, commit statuses, pagination, and ahead/behind statistics to find and compare branches before merging or reviewing.

Instructions

List branches in a Git repository with optional prefix/substring filters, includeMyBranches, commit statuses, continuation-token pagination, and ahead/behind branch statistics

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repositoryId": "<repositoryId>"
    },
    "name": "list_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMaximum number of branches to return per page (1–1000; supported on Azure DevOps Services and Server 2020+)
filterNoOptional branch name prefix filter (e.g., "feature/" or "heads/feature/"). Automatically scoped to heads/. Cannot be combined with includeMyBranches: true.
projectIdNoThe ID or name of the project (defaults to AZURE_DEVOPS_DEFAULT_PROJECT)
includeStatsNoEnrich branches with aheadCount, behindCount, isBaseVersion, and tip commit from stats/branches
repositoryIdYesThe ID or name of the repository
filterContainsNoOptional substring filter for branch names
organizationIdNoThe ID or name of the organization (defaults to configured organization)
includeStatusesNoInclude Git commit statuses on each branch
continuationTokenNoContinuation token from a previous list_branches response (supported on Azure DevOps Services and Server 2020+)
includeMyBranchesNoReturn only branches created by the authenticated caller. Cannot be combined with filter.
latestStatusesOnlyNoReturn only the latest status per context (requires includeStatuses: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.13

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly, idempotent, non-destructive, open-world behavior, so the description does not need to re-state safety. It adds some value by surfacing that pagination and enrichment (statuses, ahead/behind stats) are possible, but it never notes that enrichments may be costlier or slower, nor how pagination terminates beyond the token name. That leaves an agent without behavioral caveats for an 11-parameter read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that packs the verb, resource, and capability set with no filler. It reads as an undifferentiated clause list rather than prioritizing the most common path (simple list by repository), which keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an 11-parameter schema with full description coverage, no output schema, and rich annotations, the description covers what an agent needs to know it can filter, paginate, and enrich. It stops short of describing result shape or defaults, but the schema and annotations absorb most of that burden.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents every parameter including the filter/includeMyBranches incompatibility and the includeStatuses prerequisite for latestStatusesOnly. The description only echoes parameter names as a feature list ("prefix/substring filters, includeMyBranches, commit statuses, continuation-token pagination, ahead/behind statistics") without adding syntax, defaults, or interaction detail, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("List branches in a Git repository") and enumerates the notable capabilities: prefix/substring filters, my-branches scope, commit statuses, pagination, and ahead/behind stats. An agent can distinguish it from create_branch purely on the "list" verb, but the description never names a sibling or disambiguates from adjacent listing tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the verb "List" and the availability of filters; there is no explicit statement of when to reach for this tool versus other listings or when narrower accessors are preferable. The mutual-exclusion note (filter vs includeMyBranches) is a constraint rather than guidance, and it is already carried by the schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.