capability_id: issue.view
version: "1.0.0"
description: Fetch one issue by number.
input_schema:
  type: object
  required: [owner, name, issueNumber]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    issueNumber: { type: integer, minimum: 1 }
  additionalProperties: false
output_schema:
  type: object
  required: [id, number, title, state, url, body, labels]
  properties:
    id: { type: string, minLength: 1 }
    number: { type: integer, minimum: 1 }
    title: { type: string }
    state: { type: string }
    url: { type: string, minLength: 1 }
    body: { type: string }
    labels: { type: array, items: { type: string } }
  additionalProperties: false
routing:
  preferred: graphql
  fallbacks: [cli]
  notes:
    - Prefer GraphQL for structured fetch; CLI fallback if gh auth unavailable.
graphql:
  operationName: IssueView
  operationType: query
  documentPath: src/gql/operations/issue-view.graphql
cli:
  command: issue view
  jsonFields: [id, number, title, state, url, body, labels]
