capability_id: pr.threads.list
version: "1.0.0"
description: List pull request review threads (unresolved only by default; pass unresolvedOnly:false to include resolved).
input_schema:
  type: object
  required: [owner, name, prNumber]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    prNumber: { type: integer, minimum: 1 }
    first: { type: integer, minimum: 1, maximum: 100, default: 30 }
    after: { type: [string, "null"] }
    unresolvedOnly: { type: boolean }
    includeOutdated: { type: boolean }
  additionalProperties: false
output_schema:
  type: object
  required: [items, pageInfo]
  properties:
    items:
      type: array
      items:
        type: object
        required:
          [
            id,
            path,
            line,
            startLine,
            diffSide,
            subjectType,
            isResolved,
            isOutdated,
            viewerCanReply,
            viewerCanResolve,
            viewerCanUnresolve,
            resolvedByLogin,
            comments
          ]
        properties:
          id: { type: string, minLength: 1 }
          path: { type: [string, "null"] }
          line: { type: [integer, "null"] }
          startLine: { type: [integer, "null"] }
          diffSide: { type: [string, "null"] }
          subjectType: { type: [string, "null"] }
          isResolved: { type: boolean }
          isOutdated: { type: boolean }
          viewerCanReply: { type: boolean }
          viewerCanResolve: { type: boolean }
          viewerCanUnresolve: { type: boolean }
          resolvedByLogin: { type: [string, "null"] }
          comments:
            type: array
            items:
              type: object
              required: [id, authorLogin, body, createdAt, url]
              properties:
                id: { type: string, minLength: 1 }
                authorLogin: { type: [string, "null"] }
                body: { type: string }
                createdAt: { type: string, minLength: 1 }
                url: { type: string, minLength: 1 }
              additionalProperties: false
        additionalProperties: false
    pageInfo:
      type: object
      required: [hasNextPage, endCursor]
      properties:
        hasNextPage: { type: boolean }
        endCursor: { type: [string, "null"] }
      additionalProperties: false
    filterApplied:
      type: object
      required: [unresolvedOnly, includeOutdated]
      properties:
        unresolvedOnly: { type: boolean }
        includeOutdated: { type: boolean }
      additionalProperties: false
    scan:
      type: object
      required: [pagesScanned, sourceItemsScanned, scanTruncated]
      properties:
        pagesScanned: { type: integer, minimum: 0 }
        sourceItemsScanned: { type: integer, minimum: 0 }
        scanTruncated: { type: boolean }
      additionalProperties: false
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: []
  notes:
    - Prefer GraphQL for review-thread semantics and unresolved filtering.
graphql:
  operationName: PrCommentsList
  operationType: query
  documentPath: src/gql/operations/pr-comments-list.graphql
cli:
  command: api graphql
