Skip to main content
Glama
Azure DevOps MCP Server

Azure DevOps MCP Server

get_analytics_metrics

Read-onlyIdempotent

Run curated Azure DevOps Analytics OData metric presets to retrieve pipeline pass rates, duration percentiles, flaky or failed tests, and work item cycle times or counts.

Instructions

Run curated Azure DevOps Analytics OData $apply metric presets (pipeline_pass_rate, pipeline_duration_percentiles, flaky_tests, failed_tests, work_item_cycle_time, work_item_counts). Note: Analytics has no area-path-level security and exhibits eventual consistency lag behind real-time state.

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": {
      "metric": "<metric>"
    },
    "name": "get_analytics_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMaximum number of aggregated metric groups to return (default: 100, max: 1000).
daysNoOptional rolling lookback window in days (e.g. 30). Omit to aggregate all available Analytics history.
scopeNoQuery scope: "project" (recommended default) or "organization" (opt-in org/collection-wide aggregation).project
metricYesCurated Analytics metric preset: "pipeline_pass_rate", "pipeline_duration_percentiles", "flaky_tests", "failed_tests", "work_item_cycle_time", or "work_item_counts".
endDateNoOptional inclusive ISO 8601 end DateTimeOffset with timezone offset (e.g. "2026-11-30T23:59:59Z").
versionNoAzure DevOps Analytics OData version (default: "v3.0-preview" for Server 2019/2020/2022 + Cloud compatibility).v3.0-preview
areaPathNoOptional exact AreaPath filter (applicable to work_item_* presets).
workflowNoOptional test execution workflow filter ("Build" or "Release"; applicable to flaky_tests and failed_tests).
projectIdNoProject ID or name (defaults to AZURE_DEVOPS_DEFAULT_PROJECT when scope is "project").
startDateNoOptional inclusive ISO 8601 start DateTimeOffset with timezone offset (e.g. "2026-11-01T00:00:00Z").
branchNameNoOptional branch name filter, e.g. "refs/heads/main" (applicable to pipeline_* and test_* presets).
pipelineNameNoOptional pipeline name filter (applicable to pipeline_* and test_* presets).
workItemTypeNoOptional work item type filter, e.g. "User Story" or "Bug" (applicable to work_item_* presets).
iterationPathNoOptional exact IterationPath filter (applicable to work_item_* presets).
organizationIdNoOptional Azure DevOps organization (Cloud) or collection (Server) override.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.13

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the bar is lower; the description still adds two genuinely non-obvious traits: absence of area-path-level security (notable given an `areaPath` param exists) and eventual-consistency lag versus real-time state. It does not describe result shape or size limits, which is the remaining gap.

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

Conciseness5/5

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

Two sentences, front-loaded with the action and allowed values, followed by a tightly worded caveat block. No filler, no restatement of the title, and the security/consistency caveats are the highest-value content per word.

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

Completeness3/5

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

With 15 parameters, no output schema, and aggregation semantics (grouped metrics governed by `top`), the definition is thin on the return side: it never says what an aggregated metric group looks like or how pagination/truncation behaves. The caveat note partially compensates, but an agent still cannot predict the response structure.

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 description coverage is 100% and every parameter already carries a description including which presets each filter applies to, so the schema does the heavy lifting. The description only restates the preset enum names, adding no format, default, or interaction guidance beyond the schema.

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?

Names a specific verb ("Run") and resource ("curated Azure DevOps Analytics OData $apply metric presets") and enumerates all six presets, so the tool's scope is unambiguous. It does not explicitly contrast itself with the raw `query_analytics` sibling, which is the closest potential confusion point, so it stops short of a 5.

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?

The word "curated" and the preset list imply this is the pre-built alternative to a raw OData query, but the description never states when to prefer it over `query_analytics` or `get_analytics_schema`, nor any preconditions. Usage is inferable but not spelled out.

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