{"name":"query_dataset","title":"Query a dataset","description":"Query rows from one dataset with filters, select, group by (with count/sum/avg/min/max), order, and limit (max 1000). Map layers also accept near: {lat, lon, radiusMeters}. Returns rows, a truncated flag, and the upstream query URL. Call describe_dataset first for field names.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"select":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}},"filters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"op":{"type":"string","enum":["=","!=",">",">=","<","<=","like","in","is_null","not_null"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"}]},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"}]}}]}},"required":["field","op"]}},"groupBy":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":100}},"aggregate":{"type":"object","properties":{"fn":{"type":"string","enum":["count","sum","avg","min","max"]},"field":{"type":"string","maxLength":100}},"required":["fn"]},"orderBy":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["field"]}},"limit":{"default":100,"type":"integer","minimum":1,"maximum":1000},"offset":{"type":"integer","minimum":0,"maximum":1000000},"near":{"description":"Map layers only: features within radiusMeters of a point","type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"radiusMeters":{"type":"number","minimum":0,"maximum":5000}},"required":["lat","lon","radiusMeters"]},"includeGeometry":{"type":"boolean"}},"required":["id"]}}