{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentifizierung-de/json-schema/agentifizierung-de-json-rpc-request-schema.json",
  "title": "JsonRpcRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentifizierung-de-openapi.json#/components/schemas/JsonRpcRequest",
  "type": "object",
  "properties": {
    "jsonrpc": {
      "type": "string",
      "enum": [
        "2.0"
      ]
    },
    "id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ]
    },
    "method": {
      "type": "string",
      "enum": [
        "message/send"
      ]
    },
    "params": {
      "$ref": "#/$defs/SendMessageRequest"
    }
  },
  "required": [
    "jsonrpc",
    "method",
    "params"
  ],
  "$defs": {
    "SendMessageRequest": {
      "type": "object",
      "properties": {
        "message": {
          "$ref": "#/$defs/UserMessage"
        }
      },
      "required": [
        "message"
      ]
    },
    "TextPart": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "text"
          ]
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "text"
      ]
    },
    "UserMessage": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user"
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "message"
          ]
        },
        "messageId": {
          "type": "string"
        },
        "contextId": {
          "type": "string"
        },
        "parts": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/TextPart"
          }
        }
      },
      "required": [
        "parts"
      ]
    }
  }
}