{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "QueryDataToolStructuredOutput",
    "type": "object",
    "properties": {
        "geometryType": {
            "type": "string",
            "description": "Describes the geometry type of the layer (e.g., esriGeometryPoint, esriGeometryPolygon, etc.)."
        },
        "spatialReference": {
            "type": "object",
            "description": "Spatial reference information for the layer or results."
        },
        "resultRecords": {
            "type": "array",
            "description": "List of result records returned by the query.",
            "items": {
                "type": "object",
                "properties": {
                    "attributes": {
                        "type": "object",
                        "description": "Key-value pairs representing the record's attributes."
                    },
                    "geometry": {
                        "type": "object",
                        "description": "Geometry object for the record."
                    }
                },
                "required": [
                    "attributes"
                ]
            }
        },
        "totalMatchingRecords": {
            "type": "integer",
            "description": "Total number of records matching the query. Not provided if query was for statistics",
            "minimum": 0
        },
        "statistics": {
            "type": "array",
            "description": "List of statistical results (if any).",
            "items": {
                "type": "object",
                "properties": {
                    "attributes": {
                        "type": "object",
                        "description": "Key-value pairs representing the statistic's attributes. The attribute name will be of the form '<statistic_type>_<statistic_field>' so you can tell what values it corresponds to. For example, 'average of the population field' would be 'avg_pop'."
                    }
                },
                "required": [
                    "attributes"
                ]
            }
        }
    }
}