{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "DescribeLayerToolStructuredOutput",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "The name of the layer"
        },
        "type": {
            "type": "string",
            "description": "The type of the layer, usually 'Feature Layer' or 'Table'"
        },
        "description": {
            "type": "string",
            "description": "A text description of the inspected layer"
        },
        "extent": {
            "$ref": "#/$defs/layerExtent",
            "description": "The configured extent of the layer"
        },
        "spatialReference": {
            "$ref": "#/$defs/spatialReference",
            "description": "The configured spatial reference of the layer"
        },
        "fields": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "The field name"
                    },
                    "type": {
                        "type": "string",
                        "description": "The field type",
                        "examples": [
                            "esriFieldTypeSmallInteger",
                            "esriFieldTypeInteger",
                            "esriFieldTypeSingle",
                            "esriFieldTypeDouble",
                            "esriFieldTypeString",
                            "esriFieldTypeDate",
                            "esriFieldTypeOID",
                            "esriFieldTypeGeometry",
                            "esriFieldTypeBlob",
                            "esriFieldTypeGlobalID",
                            "esriFieldTypeGUID",
                            "esriFieldTypeRaster",
                            "esriFieldTypeXML",
                            "esriFieldTypeDateOnly",
                            "esriFieldTypeTimeOnly",
                            "esriFieldTypeTimestampOffset",
                            "esriFieldTypeBigInteger"
                        ]
                    },
                    "alias": {
                        "type": "string",
                        "description": "A more human-readable name for the field"
                    },
                    "description": {
                        "type": "string",
                        "description": "A description for the field"
                    },
                    "fieldValueType": {
                        "type": "string",
                        "description": "If provided, classifies the nature or intent of the field",
                        "examples": [
                            "nameOrTitle",
                            "description",
                            "typeOrCategory",
                            "countOrAmount",
                            "percentageOrRatio",
                            "measurement",
                            "uniqueIdentifier",
                            "orderedOrRanked",
                            "binary",
                            "locationOrPlaceName",
                            "coordinate",
                            "dateAndTime"
                        ]
                    },
                    "sampleValues": {
                        "type": "array"
                    }
                },
                "required": [
                    "name",
                    "type"
                ]
            }
        }
    },
    "required": [
        "name"
    ],
    "$defs": {
        "spatialReference": {
            "description": "An ArcGIS spatial reference, specified as a full spatial reference JSON object. For common WKIDs such as 4326 (WGS84, longitude/latitude), 3857 (Web Mercator), 102100 (Web Mercator alternate), etc. use the 'wkid' property. For custom or uncommon coordinate systems, use the 'wkt' (well-known text) string.",
            "type": "object",
            "properties": {
                "wkid": {
                    "type": "integer",
                    "description": "The well-known ID of the spatial reference."
                },
                "latestWkid": {
                    "type": "integer",
                    "description": "The latest well-known ID, used when the WKID has been superseded by a newer identifier."
                },
                "wkt": {
                    "type": "string",
                    "description": "A well-known text (WKT) string defining a custom spatial reference."
                }
            }
        },
        "layerExtent": {
            "description": "The configured extent of the layer, represented as an object with xmin, ymin, xmax, ymax properties",
            "type": "object",
            "properties": {
                "xmin": {
                    "type": "number",
                    "description": "The minimum x-coordinate of the extent"
                },
                "ymin": {
                    "type": "number",
                    "description": "The minimum y-coordinate of the extent"
                },
                "xmax": {
                    "type": "number",
                    "description": "The maximum x-coordinate of the extent"
                },
                "ymax": {
                    "type": "number",
                    "description": "The maximum y-coordinate of the extent"
                },
                "spatialReference": {
                    "$ref": "#/$defs/spatialReference",
                    "description": "The spatial reference of the extent coordinates"
                }
            }
        }
    }
}