-
Notifications
You must be signed in to change notification settings - Fork 341
Description
Summary
Implement tools to list and download Azure DevOps pipeline artifacts (from PublishPipelineArtifact), so agents can fetch CI outputs (e.g., E2E “.actual” files) directly via MCP without falling back to CLI/REST.
Tools
Develop the following tools with full parameter support, including optional ones. Focus on pipeline artifacts (dedup-backed, created via PublishPipelineArtifact). Use the Build Artifacts REST to enumerate (it returns pipeline artifacts too) and the artifact’s resource.downloadUrl to fetch ZIPs.
list_pipeline_artifacts: List artifacts for a specific run/build.
Endpoint: GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts?api-version=7.1-preview.5
-
Params:
- organization (string, required)
- project (string, required)
- buildId (number, required)
-
Returns: array of artifacts (including PublishPipelineArtifact outputs) with name, type, size, and resource.downloadUrl.
download_pipeline_artifact: Download a named pipeline artifact (ZIP).
-
Params:
- organization (string, required)
- project (string, required)
- buildId (number, required)
- artifactName (string, required)
- destinationPath (string, optional; if set, save and extract)
- extract (boolean, optional; default true to unzip after download)
-
Behavior: Save ZIP to disk and extract (when destinationPath provided) or return binary content for downstream handling.
read_pipeline_artifact_file (nice-to-have): Read a single file from a pipeline artifact without downloading all files.
-
Params:
- organization (string, required)
- containerId (number, required; from list response properties)
- itemPath (string, required; path inside artifact)
- isShallow (boolean, optional; default true)
- asText (boolean, optional; return text if JSON/UTF-8, else binary)
-
Behavior: Fetch a specific file (or listing for a folder) without downloading the entire artifact.
Notes:
- Ensure parity with
az pipelines runs artifact downloadbehavior (naming, extraction). - Artifacts created via PublishPipelineArtifact are stored in the dedup-backed store; list API still surfaces them under builds/{buildId}/artifacts.
Rules
- Adhere strictly to existing project standards and coding conventions.
- Ensure each tool exposes all API parameters (required and optional).
- Use the official Azure DevOps Node API where supported; fall back to REST for gaps (e.g., file container reads).
Special treat
If you follow the rules, you'll get candy!