get_analytics_metrics
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
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Maximum number of aggregated metric groups to return (default: 100, max: 1000). | |
| days | No | Optional rolling lookback window in days (e.g. 30). Omit to aggregate all available Analytics history. | |
| scope | No | Query scope: "project" (recommended default) or "organization" (opt-in org/collection-wide aggregation). | project |
| metric | Yes | Curated Analytics metric preset: "pipeline_pass_rate", "pipeline_duration_percentiles", "flaky_tests", "failed_tests", "work_item_cycle_time", or "work_item_counts". | |
| endDate | No | Optional inclusive ISO 8601 end DateTimeOffset with timezone offset (e.g. "2026-11-30T23:59:59Z"). | |
| version | No | Azure DevOps Analytics OData version (default: "v3.0-preview" for Server 2019/2020/2022 + Cloud compatibility). | v3.0-preview |
| areaPath | No | Optional exact AreaPath filter (applicable to work_item_* presets). | |
| workflow | No | Optional test execution workflow filter ("Build" or "Release"; applicable to flaky_tests and failed_tests). | |
| projectId | No | Project ID or name (defaults to AZURE_DEVOPS_DEFAULT_PROJECT when scope is "project"). | |
| startDate | No | Optional inclusive ISO 8601 start DateTimeOffset with timezone offset (e.g. "2026-11-01T00:00:00Z"). | |
| branchName | No | Optional branch name filter, e.g. "refs/heads/main" (applicable to pipeline_* and test_* presets). | |
| pipelineName | No | Optional pipeline name filter (applicable to pipeline_* and test_* presets). | |
| workItemType | No | Optional work item type filter, e.g. "User Story" or "Bug" (applicable to work_item_* presets). | |
| iterationPath | No | Optional exact IterationPath filter (applicable to work_item_* presets). | |
| organizationId | No | Optional Azure DevOps organization (Cloud) or collection (Server) override. |