capability_id: workflow.job.logs.view
version: "1.0.0"
description: Fetch and analyze workflow job logs.
input_schema:
  type: object
  required: [owner, name, jobId]
  properties:
    owner: { type: string, minLength: 1 }
    name: { type: string, minLength: 1 }
    jobId: { type: integer, minimum: 1 }
  additionalProperties: false
output_schema:
  type: object
  required: [jobId, truncated, summary]
  properties:
    jobId: { type: integer, minimum: 1 }
    truncated: { type: boolean }
    summary:
      type: object
      required: [errorCount, warningCount, topErrorLines]
      properties:
        errorCount: { type: integer, minimum: 0 }
        warningCount: { type: integer, minimum: 0 }
        topErrorLines:
          type: array
          items: { type: string }
      additionalProperties: false
  additionalProperties: false
routing:
  preferred: cli
  fallbacks: []
cli:
  command: run view
