{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.root.agent.input.json",
  "title": "Nth root — agent input",
  "type": "object",
  "properties": {
    "a": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite binary64 number or strict decimal/scientific text ≤512 characters; nonzero-to-zero text rejects NUMERIC_UNDERFLOW. Matching aliases only."
    },
    "aInput": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Finite binary64 number or strict decimal/scientific text ≤512 characters; nonzero-to-zero text rejects NUMERIC_UNDERFLOW. Matching aliases only."
    },
    "n": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Exact positive safe integer 1–9007199254740991. Default 2 only if all index aliases are omitted; blanks/null reject. Text is checked for exact integrality before rounding."
    },
    "nInput": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Exact positive safe integer 1–9007199254740991. Default 2 only if all index aliases are omitted; blanks/null reject. Text is checked for exact integrality before rounding."
    },
    "index": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 512,
          "pattern": "^\\s*[+-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Exact positive safe integer 1–9007199254740991. Default 2 only if all index aliases are omitted; blanks/null reject. Text is checked for exact integrality before rounding."
    }
  },
  "anyOf": [
    {
      "required": [
        "a"
      ]
    },
    {
      "required": [
        "aInput"
      ]
    }
  ],
  "additionalProperties": false,
  "description": "Principal real nth root of a with positive safe-integer index n (default 2).. Mode-discriminated agent contract. Named fields are canonical; a/b are legacy share-URL aliases. (calculation_version 1.0.6)"
}
