{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/electrical.mosfet.vth/1.3.1/output.json",
  "title": "MOSFET Threshold / Overdrive — success output",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "status",
    "capability_id",
    "engine",
    "inputs",
    "result",
    "result_detail",
    "calculation_version",
    "verification"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Requested tool id"
    },
    "status": {
      "const": "success"
    },
    "capability_id": {
      "const": "electrical.mosfet.vth"
    },
    "tool": {
      "type": "string",
      "description": "Requested tool id"
    },
    "engine": {
      "type": "string"
    },
    "inputs": {
      "type": "object",
      "description": "Normalized calculation inputs (aliases resolved)"
    },
    "result": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "Vod_V",
        "region"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "overdrive",
            "id",
            "vth"
          ]
        },
        "Vgs_V": {
          "type": "number"
        },
        "Vth_V": {
          "type": "number",
          "description": "Threshold used in Vod (V). At Tj when linear; extracted at measurement T in vth mode. Not datasheet VGS(th)."
        },
        "kn_A_per_V2": {
          "type": "number"
        },
        "Vds_V": {
          "type": "number",
          "description": "Echoed when provided."
        },
        "Vod_V": {
          "type": "number",
          "description": "Overdrive Vod = Vgs − Vth (V)."
        },
        "Id_A": {
          "type": "number",
          "description": "Square-law Id for the classified region, or 0 A in cutoff."
        },
        "region": {
          "type": "string",
          "enum": [
            "cutoff",
            "above_threshold",
            "linear",
            "saturation"
          ],
          "description": "cutoff: Vod≤0. above_threshold: Vod>0 and Vds omitted. linear: 0≤Vds<Vod. saturation: Vds≥Vod. above_threshold is not strong inversion."
        },
        "strong_inversion": {
          "type": "boolean",
          "description": "Deprecated alias of Vod > 0. Not a physics strong-inversion test."
        },
        "warnings": {
          "type": "array",
          "description": "MODEL_VTH_NOT_DATASHEET_VGS_TH, SUBTHRESHOLD_NOT_MODELED, CUTOFF_NOT_MODELED (deprecated alias of SUBTHRESHOLD_NOT_MODELED), SATURATION_ASSUMED, LINEAR_REGION, SATURATION_EXTRACT_ASSUMED, NEAR_THRESHOLD, VTH_TEMP_COEFF_DEFAULT, KN_TEMP_NOT_MODELED, TEMPERATURE_NOT_APPLIED, VTH_TEMP_COEFF_POSITIVE. Also copied to the response-level warnings array."
        },
        "temperature_model": {
          "type": "string",
          "enum": [
            "none",
            "linear"
          ]
        },
        "Tj_C": {
          "type": "number"
        },
        "Tref_C": {
          "type": "number"
        },
        "alpha_V_per_C": {
          "type": "number"
        },
        "Vth_Tj_V": {
          "type": "number",
          "description": "Model Vth at Tj when linear."
        },
        "Vth_Tref_V": {
          "type": "number",
          "description": "Model Vth at Tref when linear."
        }
      }
    },
    "result_detail": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value",
        "unit",
        "formatted"
      ],
      "properties": {
        "value": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "Vod_V",
            "region"
          ],
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "overdrive",
                "id",
                "vth"
              ]
            },
            "Vgs_V": {
              "type": "number"
            },
            "Vth_V": {
              "type": "number",
              "description": "Threshold used in Vod (V). At Tj when linear; extracted at measurement T in vth mode. Not datasheet VGS(th)."
            },
            "kn_A_per_V2": {
              "type": "number"
            },
            "Vds_V": {
              "type": "number",
              "description": "Echoed when provided."
            },
            "Vod_V": {
              "type": "number",
              "description": "Overdrive Vod = Vgs − Vth (V)."
            },
            "Id_A": {
              "type": "number",
              "description": "Square-law Id for the classified region, or 0 A in cutoff."
            },
            "region": {
              "type": "string",
              "enum": [
                "cutoff",
                "above_threshold",
                "linear",
                "saturation"
              ],
              "description": "cutoff: Vod≤0. above_threshold: Vod>0 and Vds omitted. linear: 0≤Vds<Vod. saturation: Vds≥Vod. above_threshold is not strong inversion."
            },
            "strong_inversion": {
              "type": "boolean",
              "description": "Deprecated alias of Vod > 0. Not a physics strong-inversion test."
            },
            "warnings": {
              "type": "array",
              "description": "MODEL_VTH_NOT_DATASHEET_VGS_TH, SUBTHRESHOLD_NOT_MODELED, CUTOFF_NOT_MODELED (deprecated alias of SUBTHRESHOLD_NOT_MODELED), SATURATION_ASSUMED, LINEAR_REGION, SATURATION_EXTRACT_ASSUMED, NEAR_THRESHOLD, VTH_TEMP_COEFF_DEFAULT, KN_TEMP_NOT_MODELED, TEMPERATURE_NOT_APPLIED, VTH_TEMP_COEFF_POSITIVE. Also copied to the response-level warnings array."
            },
            "temperature_model": {
              "type": "string",
              "enum": [
                "none",
                "linear"
              ]
            },
            "Tj_C": {
              "type": "number"
            },
            "Tref_C": {
              "type": "number"
            },
            "alpha_V_per_C": {
              "type": "number"
            },
            "Vth_Tj_V": {
              "type": "number",
              "description": "Model Vth at Tj when linear."
            },
            "Vth_Tref_V": {
              "type": "number",
              "description": "Model Vth at Tref when linear."
            }
          }
        },
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "formatted": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "formula": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "expression": {
              "type": "string"
            },
            "label": {
              "type": "string"
            }
          }
        }
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "suggestion": {
            "type": "string"
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tier",
        "engine_tested",
        "expert_reviewed",
        "source_checked",
        "reviewed_by",
        "reviewer_role",
        "last_reviewed"
      ],
      "properties": {
        "tier": {
          "type": "string",
          "enum": [
            "candidate",
            "engine_tested",
            "internally_reviewed",
            "expert_verified"
          ]
        },
        "engine_tested": {
          "type": "boolean"
        },
        "expert_reviewed": {
          "type": "boolean"
        },
        "internally_reviewed": {
          "type": "boolean"
        },
        "review_kind": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_checked": {
          "type": "boolean"
        },
        "reviewed_by": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewer_role": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_reviewed": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "tier": {
                "const": "expert_verified"
              }
            },
            "required": [
              "tier"
            ]
          },
          "then": {
            "properties": {
              "engine_tested": {
                "const": true
              },
              "expert_reviewed": {
                "const": true
              },
              "source_checked": {
                "const": true
              },
              "reviewed_by": {
                "type": "string",
                "minLength": 1
              },
              "reviewer_role": {
                "type": "string",
                "minLength": 1
              },
              "last_reviewed": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "tier": {
                "const": "internally_reviewed"
              }
            },
            "required": [
              "tier"
            ]
          },
          "then": {
            "properties": {
              "engine_tested": {
                "const": true
              },
              "internally_reviewed": {
                "const": true
              },
              "source_checked": {
                "const": true
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "tier": {
                "const": "engine_tested"
              }
            },
            "required": [
              "tier"
            ]
          },
          "then": {
            "properties": {
              "engine_tested": {
                "const": true
              }
            }
          }
        }
      ]
    },
    "calculation_version": {
      "type": "string",
      "const": "1.3.1"
    },
    "api_version": {
      "type": "string"
    },
    "api_contract_version": {
      "type": "string"
    },
    "spec_version": {
      "type": "string"
    },
    "page": {
      "type": [
        "string",
        "null"
      ],
      "description": "Canonical calculator page URL"
    },
    "links": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema_input": {
          "type": "string",
          "format": "uri"
        },
        "schema_output": {
          "type": "string",
          "format": "uri"
        },
        "evidence": {
          "type": "string",
          "format": "uri"
        },
        "openapi": {
          "type": "string",
          "format": "uri"
        },
        "capabilities": {
          "type": "string",
          "format": "uri"
        },
        "mcp": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}
