{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roar-ai-com/json-schema/roar-ai-com-mcp-upstream-schema.json",
  "title": "McpUpstream",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roar-ai-com-openapi.json#/components/schemas/McpUpstream",
  "type": "object",
  "required": [
    "id",
    "clientId",
    "name",
    "url",
    "authType",
    "authHeader",
    "status",
    "argsPolicy",
    "toolsFetchedAt",
    "lastError",
    "createdAt",
    "updatedAt",
    "hasCredential"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "clientId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "The prefix agents see on its tools: `<name>__<tool>`"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Null unless the caller may change tool servers: an owner or admin session, or an org-level key with mcp:write. An address can carry a token in its path."
    },
    "authType": {
      "type": "string",
      "enum": [
        "none",
        "bearer",
        "header",
        "oauth"
      ],
      "description": "`oauth`: an owner or admin SIGNS IN to it; its state is `GET /client/mcp/upstreams/{id}/oauth`"
    },
    "authHeader": {
      "type": [
        "string",
        "null"
      ],
      "description": "The header NAME for `header` auth — never its value. Null on the same terms as `url`"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "disabled"
      ]
    },
    "argsPolicy": {
      "type": "string",
      "enum": [
        "pass",
        "redact",
        "block"
      ],
      "description": "What happens to personal data in a call’s ARGUMENTS. Results are always masked"
    },
    "toolsFetchedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Null until the first successful refresh"
    },
    "lastError": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why the last refresh failed, in words safe to show. Null after a success"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "hasCredential": {
      "type": "boolean",
      "description": "Whether a credential is stored. The credential itself is never returned"
    }
  }
}