capability_id: workflow.run.view
version: "1.0.0"
description: View a workflow run with its jobs.
input_schema:
  type: object
  required: [owner, name, runId]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    runId: { type: integer, minimum: 1 }
  additionalProperties: false
output_schema:
  type: object
  required: [id, workflowName, status, conclusion, headBranch, headSha, event, createdAt, updatedAt, startedAt, url, attempt, jobs]
  properties:
    id: { type: integer, minimum: 0 }
    workflowName: { type: [string, "null"] }
    status: { type: [string, "null"] }
    conclusion: { type: [string, "null"] }
    headBranch: { type: [string, "null"] }
    headSha: { type: [string, "null"] }
    event: { type: [string, "null"] }
    createdAt: { type: [string, "null"] }
    updatedAt: { type: [string, "null"] }
    startedAt: { type: [string, "null"] }
    url: { type: [string, "null"] }
    attempt: { type: integer, minimum: 1 }
    jobs:
      type: array
      items:
        type: object
        required: [id, name, status, conclusion, startedAt, completedAt, url]
        properties:
          id: { type: integer, minimum: 0 }
          name: { type: [string, "null"] }
          status: { type: [string, "null"] }
          conclusion: { type: [string, "null"] }
          startedAt: { type: [string, "null"] }
          completedAt: { type: [string, "null"] }
          url: { type: [string, "null"] }
        additionalProperties: false
  additionalProperties: false
routing:
  preferred: cli
  fallbacks: []
cli:
  command: run view
  jsonFields: [databaseId,workflowName,status,conclusion,headBranch,headSha,url,event,createdAt,updatedAt,startedAt,attempt,jobs]
