{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/finance-agent-mcp-schema-proof.v1.json",
  "title": "Finance Agent MCP Schema Proof V1",
  "description": "Redacted owner-authenticated Robinhood MCP schema-proof evidence for finance-agent readiness gates. This schema carries hashes, refs, and tool-shape summaries only; refs/hashes must be bounded redacted artifact IDs or hashes, not raw URLs, tokens, credentials, account/card/order values, raw schemas, or provider payloads.",
  "type": "object",
  "required": [
    "schema",
    "schema_proof_kind",
    "probe_state",
    "provider_dispatch_performed",
    "external_provider_call_performed",
    "live_action_performed",
    "live_order_placement_performed",
    "order_cancellation_performed",
    "card_detail_fetch_performed",
    "purchase_performed",
    "wallet_mutation_performed",
    "x402_settlement_performed"
  ],
  "anyOf": [
    { "required": ["trading"] },
    { "required": ["banking"] }
  ],
  "properties": {
    "schema": { "type": "string", "const": "agoragentic.agent-os.finance-agent-mcp-schema-proof.v1" },
    "deployment_id": { "type": "string" },
    "schema_proof_kind": { "type": "string", "const": "owner_authenticated_mcp_schema_probe" },
    "probe_state": { "type": "string", "const": "owner_authenticated_schema_probe_completed" },
    "evidence_hash": { "type": "string", "minLength": 1, "maxLength": 256 },
    "evidence_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
    "schema_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
    "probe_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
    "receipt_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
    "provider_dispatch_performed": { "type": "boolean", "const": false },
    "external_provider_call_performed": { "type": "boolean", "const": false },
    "live_action_performed": { "type": "boolean", "const": false },
    "live_order_placement_performed": { "type": "boolean", "const": false },
    "order_cancellation_performed": { "type": "boolean", "const": false },
    "card_detail_fetch_performed": { "type": "boolean", "const": false },
    "purchase_performed": { "type": "boolean", "const": false },
    "wallet_mutation_performed": { "type": "boolean", "const": false },
    "x402_settlement_performed": { "type": "boolean", "const": false },
    "trading": {
      "allOf": [
        { "$ref": "#/$defs/connector_schema_proof" },
        {
          "type": "object",
          "properties": {
            "mcp_server_name": { "type": "string", "const": "robinhood-trading" },
            "endpoint": { "type": "string", "const": "https://agent.robinhood.com/mcp/trading" },
            "endpoint_ref": { "type": "string", "const": "robinhood-trading-mcp" }
          }
        }
      ]
    },
    "banking": {
      "allOf": [
        { "$ref": "#/$defs/connector_schema_proof" },
        {
          "type": "object",
          "properties": {
            "mcp_server_name": { "type": "string", "const": "robinhood-banking" },
            "endpoint": { "type": "string", "const": "https://banking-agent.robinhood.com/mcp/banking" },
            "endpoint_ref": { "type": "string", "const": "robinhood-banking-mcp" }
          }
        }
      ]
    }
  },
  "not": {
    "anyOf": [
      { "required": ["raw_schema"] },
      { "required": ["schema_payload"] },
      { "required": ["raw_payload"] },
      { "required": ["account_values"] },
      { "required": ["card_values"] },
      { "required": ["order_values"] },
      { "required": ["auth_token"] },
      { "required": ["access_token"] },
      { "required": ["refresh_token"] }
    ]
  },
  "additionalProperties": true,
  "$defs": {
    "connector_schema_proof": {
      "type": "object",
      "required": [
        "mcp_server_name",
        "endpoint",
        "endpoint_ref",
        "schema_probe_completed",
        "tools_visible",
        "owner_authenticated",
        "auth_required",
        "owner_authenticated_probe_required",
        "schema_payload_exposed",
        "raw_schema_excluded",
        "private_payload_excluded",
        "raw_account_values_exposed",
        "raw_card_values_exposed",
        "raw_order_values_exposed"
      ],
      "allOf": [
        {
          "anyOf": [
            { "required": ["schema_hash"] },
            { "required": ["tool_schema_hash"] },
            { "required": ["schema_summary_hash"] },
            { "required": ["evidence_hash"] }
          ]
        },
        {
          "anyOf": [
            { "required": ["evidence_ref"] },
            { "required": ["schema_ref"] },
            { "required": ["probe_ref"] },
            { "required": ["receipt_ref"] }
          ]
        },
        {
          "anyOf": [
            { "required": ["tool_schema_summary"] },
            { "required": ["tool_summaries"] }
          ]
        }
      ],
      "properties": {
        "schema_proof_kind": { "type": "string", "const": "owner_authenticated_mcp_schema_probe" },
        "probe_state": { "type": "string", "const": "owner_authenticated_schema_probe_completed" },
        "mcp_server_name": { "type": "string" },
        "endpoint": { "type": "string" },
        "endpoint_ref": { "type": "string" },
        "schema_probe_completed": { "type": "boolean", "const": true },
        "tools_visible": { "type": "boolean", "const": true },
        "owner_authenticated": { "type": "boolean", "const": true },
        "auth_required": { "type": "boolean", "const": false },
        "owner_authenticated_probe_required": { "type": "boolean", "const": false },
        "schema_payload_exposed": { "type": "boolean", "const": false },
        "raw_schema_excluded": { "type": "boolean", "const": true },
        "private_payload_excluded": { "type": "boolean", "const": true },
        "raw_account_values_exposed": { "type": "boolean", "const": false },
        "raw_card_values_exposed": { "type": "boolean", "const": false },
        "raw_order_values_exposed": { "type": "boolean", "const": false },
        "schema_hash": { "type": "string", "minLength": 1, "maxLength": 256 },
        "tool_schema_hash": { "type": "string", "minLength": 1, "maxLength": 256 },
        "schema_summary_hash": { "type": "string", "minLength": 1, "maxLength": 256 },
        "evidence_hash": { "type": "string", "minLength": 1, "maxLength": 256 },
        "evidence_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
        "schema_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
        "probe_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
        "receipt_ref": { "type": "string", "minLength": 1, "maxLength": 256 },
        "tool_schema_summary": {
          "type": "array",
          "minItems": 1,
          "items": { "$ref": "#/$defs/tool_schema_summary" }
        },
        "tool_summaries": {
          "type": "array",
          "minItems": 1,
          "items": { "$ref": "#/$defs/tool_schema_summary" }
        }
      },
      "not": {
        "anyOf": [
          { "required": ["raw_schema"] },
          { "required": ["schema_payload"] },
          { "required": ["raw_payload"] },
          { "required": ["account_values"] },
          { "required": ["card_values"] },
          { "required": ["order_values"] },
          { "required": ["auth_token"] },
          { "required": ["access_token"] },
          { "required": ["refresh_token"] }
        ]
      },
      "additionalProperties": true
    },
    "tool_schema_summary": {
      "type": "object",
      "allOf": [
        {
          "anyOf": [
            { "required": ["tool_name"] },
            { "required": ["tool_name_hash"] }
          ]
        },
        {
          "anyOf": [
            { "required": ["tool_family"] },
            { "required": ["method_family"] }
          ]
        },
        {
          "anyOf": [
            { "required": ["schema_hash"] },
            { "required": ["parameter_shape_hash"] }
          ]
        }
      ],
      "properties": {
        "tool_name": { "type": "string", "minLength": 1 },
        "tool_name_hash": { "type": "string", "minLength": 1 },
        "tool_family": { "type": "string", "minLength": 1 },
        "method_family": { "type": "string", "minLength": 1 },
        "schema_hash": { "type": "string", "minLength": 1 },
        "parameter_shape_hash": { "type": "string", "minLength": 1 },
        "raw_schema_excluded": { "type": "boolean", "const": true },
        "private_payload_excluded": { "type": "boolean", "const": true }
      },
      "not": {
        "anyOf": [
          { "required": ["raw_schema"] },
          { "required": ["schema_payload"] },
          { "required": ["raw_payload"] }
        ]
      },
      "additionalProperties": true
    }
  }
}
