openapi: 3.1.0
info:
  title: PlatPhorm AgentReady API
  version: 1.1.1
  description: Independent bounded evidence-backed agent-readiness scanner.
servers:
  - url: https://agentready.platphormnews.com
paths:
  /api/v1/scans:
    post:
      operationId: createPublicScan
      summary: Run a bounded public-safe scan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: https://agentready.platphormnews.com/openapi.json#/components/schemas/TestRequest
      responses:
        '201': { description: Scan locator }
        '400': { description: Structured invalid request error }
  /api/mcp:
    get:
      operationId: getMcpMetadata
      summary: Get AgentReady MCP metadata
      responses:
        '200': { description: MCP capability metadata }
    post:
      operationId: handleMcpJsonRpc
      summary: Handle MCP JSON-RPC 2.0 requests
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [jsonrpc, method]
              properties:
                jsonrpc: { type: string, const: '2.0' }
                id: { oneOf: [{ type: string }, { type: number }, { type: 'null' }] }
                method: { type: string }
                params: { type: object, additionalProperties: true }
      responses:
        '200': { description: JSON-RPC result or error }
        '400': { description: JSON-RPC parse error }
  /api/v1/scans/{id}:
    get:
      operationId: getScanReport
      summary: Retrieve a persisted public-safe report
      parameters:
        - { name: id, in: path, required: true, schema: { type: string, format: uuid } }
      responses:
        '200': { description: Report envelope }
        '404': { description: Structured not-found error }
  /api/v1/answerready/test:
    post:
      operationId: runAnswerReadyFullReport
      summary: Run the protected complete report for AnswerReady
      security: [{ bearerAuth: [] }, { platphormApiKey: [] }]
      responses:
        '201': { description: Complete report }
        '401': { description: Structured authentication error }
components:
  securitySchemes:
    bearerAuth: { type: http, scheme: bearer, bearerFormat: PLATPHORM_API_KEY }
    platphormApiKey: { type: apiKey, in: header, name: X-PlatPhorm-API-Key }
