Add new tool for pipelines stage timeline · Issue #1701 · microsoft/azure-devops-mcp · GitHub
Skip to content

Add new tool for pipelines stage timeline #1701

Activity

  1. danhellem commented on Oct 15, 2026

    @danhellem
    CollaboratorAuthor

    SDK investigation and implementation recommendation

    I checked SDK support before considering direct REST access.

    SDK availability

    • The currently installed azure-devops-node-api 15.1.2 does not expose getBuildStageTimeline.
    • I also checked the latest published azure-devops-node-api 17.0.1. It still does not expose:
      • getBuildStageTimeline
      • getBuildStageLatestTimeline
    • The installed azure-devops-extension-api does expose both methods. However, that client is intended primarily for Azure DevOps web extensions and would introduce a second HTTP and authentication stack into this Node MCP server.

    Recommendation

    Add a get_stage_timeline action to the existing pipelines_build tool and call the endpoint through connection.rest.get rather than global fetch.

    This approach:

    • Retains the existing WebApi authentication handlers.
    • Preserves existing proxy, certificate, retry, and user-agent behavior.
    • Avoids manually retrieving or placing credentials in an Authorization header.
    • Follows the existing connection.rest.get fallback pattern in src/tools/repositories.ts.
    • Avoids coupling the server to the browser-oriented extension client.

    Suggested inputs

    • project: required string
    • buildId: required positive integer
    • timelineId: required UUID
    • stageName: required non-empty string
    • changeId: optional non-negative integer
    • planId: optional UUID

    Endpoint

    GET {organization}/{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}/stages/{stageName}
        ?changeId={changeId}
        &planId={planId}
        &api-version=7.2-preview.1
    

    The implementation should:

    1. Obtain the existing WebApi connection from connectionProvider.
    2. Build the URL relative to connection.serverUrl.
    3. Independently encode project, timelineId, and stageName.
    4. Use API version 7.2-preview.1.
    5. Add changeId and planId only when supplied.
    6. Call connection.rest.get<Timeline>(url, { deserializeDates: true }).
    7. Return the timeline as formatted JSON.
    8. Report an explicit error if the response does not contain a result.

    Tests

    Add focused tests covering:

    • Registration of the get_stage_timeline action.
    • The exact stage-timeline route.
    • Required parameter validation.
    • UUID validation for timelineId and planId.
    • Optional changeId and planId query parameters.
    • Encoding of all user-controlled path components.
    • Successful timeline serialization.
    • Missing response results.
    • REST and authentication errors.
  2. danhellem commented on Oct 21, 2026

    @danhellem
    CollaboratorAuthor

    FYI, we are currently blocked on not having this API available in the client library. We are trying to figure out when it will be available.

  3. danhellem commented on Oct 22, 2026

    @danhellem
    CollaboratorAuthor

    This issue is going to be on hold for a couple of sprints while we wait for the endpoint to be added to the client library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Added to Remote Backlog 📅added the issue to our internal remote mcp server backlogNeeds Review 👓needs review by the product teamPipelines 🚀builds, releases and pipelines area

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions