{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "resolve_master_data_entity tool input",
  "description": "Input for the paid resolution of identifying attributes to the matching golden-record identity. Mirrors POST /v1/master-data/entities/resolve. At least one of identifiers or attributes must be supplied.",
  "type": "object",
  "required": [
    "entity_type"
  ],
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "identifiers"
      ]
    },
    {
      "required": [
        "attributes"
      ]
    }
  ],
  "properties": {
    "entity_type": {
      "$ref": "#/$defs/entityType"
    },
    "identifiers": {
      "type": "array",
      "minItems": 1,
      "description": "Known identifiers of the entity being resolved.",
      "items": {
        "type": "object",
        "required": [
          "system",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "system": {
            "type": "string",
            "minLength": 1,
            "description": "Identifier system the value belongs to."
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "description": "The identifier value within its system."
          }
        }
      }
    },
    "attributes": {
      "type": "object",
      "description": "Identifying attribute values keyed by field name, e.g. a name or an address line.",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "entityType": {
      "description": "One of the v1 entity domains. customer, asset, and person are closed Operator decisions, not gaps; reference data is served by get_reference_data.",
      "enum": [
        "supplier",
        "location",
        "organization"
      ]
    }
  }
}
