Azure Repos · Capability

Azure Repos Git API — Pull Requests

Azure Repos Git API — Pull Requests. 5 operations. Lead operation: Azure Repos List pull requests. Self-contained Naftiko capability covering one Microsoft Azure Repo business surface.

Run with Naftiko Microsoft Azure RepoPull Requests

What You Can Do

GET
Pullrequestslist — Azure Repos List pull requests
/v1/git/repositories/{repositoryid}/pullrequests
POST
Pullrequestscreate — Azure Repos Create a pull request
/v1/git/repositories/{repositoryid}/pullrequests
GET
Pullrequestsget — Azure Repos Get a pull request
/v1/git/repositories/{repositoryid}/pullrequests/{pullrequestid}
PATCH
Pullrequestsupdate — Azure Repos Update a pull request
/v1/git/repositories/{repositoryid}/pullrequests/{pullrequestid}
GET
Pullrequestcommitslist — Azure Repos List pull request commits
/v1/git/repositories/{repositoryid}/pullrequests/{pullrequestid}/commits

MCP Tools

azure-repos-list-pull-requests

Azure Repos List pull requests

read-only idempotent
azure-repos-create-pull-request

Azure Repos Create a pull request

azure-repos-get-pull-request

Azure Repos Get a pull request

read-only idempotent
azure-repos-update-pull-request

Azure Repos Update a pull request

idempotent
azure-repos-list-pull-request

Azure Repos List pull request commits

read-only idempotent

Capability Spec

azure-repo-git-pull-requests.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Azure Repos Git API — Pull Requests
  description: 'Azure Repos Git API — Pull Requests. 5 operations. Lead operation: Azure Repos List pull requests. Self-contained
    Naftiko capability covering one Microsoft Azure Repo business surface.'
  tags:
  - Microsoft Azure Repo
  - Pull Requests
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_AZURE_REPO_API_KEY: MICROSOFT_AZURE_REPO_API_KEY
capability:
  consumes:
  - type: http
    namespace: azure-repo-git-pull-requests
    baseUri: https://dev.azure.com/{organization}/{project}/_apis
    description: Azure Repos Git API — Pull Requests business capability. Self-contained, no shared references.
    resources:
    - name: git-repositories-repositoryId-pullrequests
      path: /git/repositories/{repositoryId}/pullrequests
      operations:
      - name: pullrequestslist
        method: GET
        description: Azure Repos List pull requests
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: searchCriteria.status
          in: query
          type: string
          description: Filter by pull request status. Defaults to active if unset.
        - name: searchCriteria.creatorId
          in: query
          type: string
          description: Filter by the identity ID of the pull request creator
        - name: searchCriteria.reviewerId
          in: query
          type: string
          description: Filter by the identity ID of a reviewer
        - name: searchCriteria.sourceRefName
          in: query
          type: string
          description: Filter by source branch name (e.g., refs/heads/feature)
        - name: searchCriteria.targetRefName
          in: query
          type: string
          description: Filter by target branch name (e.g., refs/heads/main)
        - name: searchCriteria.repositoryId
          in: query
          type: string
          description: Filter by target repository ID
        - name: searchCriteria.sourceRepositoryId
          in: query
          type: string
          description: Filter by source repository ID
        - name: searchCriteria.includeLinks
          in: query
          type: boolean
          description: Whether to include the _links field on shallow references
        - name: searchCriteria.minTime
          in: query
          type: string
          description: Filter pull requests created or closed after this date based on queryTimeRangeType
        - name: searchCriteria.maxTime
          in: query
          type: string
          description: Filter pull requests created or closed before this date based on queryTimeRangeType
        - name: searchCriteria.queryTimeRangeType
          in: query
          type: string
          description: The type of time range for minTime and maxTime. Defaults to created if unset.
        - name: $top
          in: query
          type: integer
          description: Number of pull requests to retrieve
        - name: $skip
          in: query
          type: integer
          description: Number of pull requests to skip
      - name: pullrequestscreate
        method: POST
        description: Azure Repos Create a pull request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: git-repositories-repositoryId-pullrequests-pullRequestId
      path: /git/repositories/{repositoryId}/pullrequests/{pullRequestId}
      operations:
      - name: pullrequestsget
        method: GET
        description: Azure Repos Get a pull request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: pullrequestsupdate
        method: PATCH
        description: Azure Repos Update a pull request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: git-repositories-repositoryId-pullrequests-pullRequestId-commits
      path: /git/repositories/{repositoryId}/pullrequests/{pullRequestId}/commits
      operations:
      - name: pullrequestcommitslist
        method: GET
        description: Azure Repos List pull request commits
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.MICROSOFT_AZURE_REPO_API_KEY}}'
  exposes:
  - type: rest
    namespace: azure-repo-git-pull-requests-rest
    port: 8080
    description: REST adapter for Azure Repos Git API — Pull Requests. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/git/repositories/{repositoryid}/pullrequests
      name: git-repositories-repositoryid-pullrequests
      description: REST surface for git-repositories-repositoryId-pullrequests.
      operations:
      - method: GET
        name: pullrequestslist
        description: Azure Repos List pull requests
        call: azure-repo-git-pull-requests.pullrequestslist
        with:
          searchCriteria.status: rest.searchCriteria.status
          searchCriteria.creatorId: rest.searchCriteria.creatorId
          searchCriteria.reviewerId: rest.searchCriteria.reviewerId
          searchCriteria.sourceRefName: rest.searchCriteria.sourceRefName
          searchCriteria.targetRefName: rest.searchCriteria.targetRefName
          searchCriteria.repositoryId: rest.searchCriteria.repositoryId
          searchCriteria.sourceRepositoryId: rest.searchCriteria.sourceRepositoryId
          searchCriteria.includeLinks: rest.searchCriteria.includeLinks
          searchCriteria.minTime: rest.searchCriteria.minTime
          searchCriteria.maxTime: rest.searchCriteria.maxTime
          searchCriteria.queryTimeRangeType: rest.searchCriteria.queryTimeRangeType
          $top: rest.$top
          $skip: rest.$skip
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: pullrequestscreate
        description: Azure Repos Create a pull request
        call: azure-repo-git-pull-requests.pullrequestscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/git/repositories/{repositoryid}/pullrequests/{pullrequestid}
      name: git-repositories-repositoryid-pullrequests-pullrequestid
      description: REST surface for git-repositories-repositoryId-pullrequests-pullRequestId.
      operations:
      - method: GET
        name: pullrequestsget
        description: Azure Repos Get a pull request
        call: azure-repo-git-pull-requests.pullrequestsget
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: pullrequestsupdate
        description: Azure Repos Update a pull request
        call: azure-repo-git-pull-requests.pullrequestsupdate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/git/repositories/{repositoryid}/pullrequests/{pullrequestid}/commits
      name: git-repositories-repositoryid-pullrequests-pullrequestid-commits
      description: REST surface for git-repositories-repositoryId-pullrequests-pullRequestId-commits.
      operations:
      - method: GET
        name: pullrequestcommitslist
        description: Azure Repos List pull request commits
        call: azure-repo-git-pull-requests.pullrequestcommitslist
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: azure-repo-git-pull-requests-mcp
    port: 9090
    transport: http
    description: MCP adapter for Azure Repos Git API — Pull Requests. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: azure-repos-list-pull-requests
      description: Azure Repos List pull requests
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: azure-repo-git-pull-requests.pullrequestslist
      with:
        searchCriteria.status: tools.searchCriteria.status
        searchCriteria.creatorId: tools.searchCriteria.creatorId
        searchCriteria.reviewerId: tools.searchCriteria.reviewerId
        searchCriteria.sourceRefName: tools.searchCriteria.sourceRefName
        searchCriteria.targetRefName: tools.searchCriteria.targetRefName
        searchCriteria.repositoryId: tools.searchCriteria.repositoryId
        searchCriteria.sourceRepositoryId: tools.searchCriteria.sourceRepositoryId
        searchCriteria.includeLinks: tools.searchCriteria.includeLinks
        searchCriteria.minTime: tools.searchCriteria.minTime
        searchCriteria.maxTime: tools.searchCriteria.maxTime
        searchCriteria.queryTimeRangeType: tools.searchCriteria.queryTimeRangeType
        $top: tools.$top
        $skip: tools.$skip
      outputParameters:
      - type: object
        mapping: $.
    - name: azure-repos-create-pull-request
      description: Azure Repos Create a pull request
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: azure-repo-git-pull-requests.pullrequestscreate
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: azure-repos-get-pull-request
      description: Azure Repos Get a pull request
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: azure-repo-git-pull-requests.pullrequestsget
      outputParameters:
      - type: object
        mapping: $.
    - name: azure-repos-update-pull-request
      description: Azure Repos Update a pull request
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: azure-repo-git-pull-requests.pullrequestsupdate
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: azure-repos-list-pull-request
      description: Azure Repos List pull request commits
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: azure-repo-git-pull-requests.pullrequestcommitslist
      outputParameters:
      - type: object
        mapping: $.