Run SQL
queryRun one read-only SQL statement (SELECT, WITH, SHOW or DESCRIBE) in the Amazon Athena (Trino) dialect and return up to 1,000 rows with column names and bytes scanned. Qualify every table as database.table. Select only the columns you need and filter on year or state columns where they exist, because each query has a scan limit (1 GB without a key, 10 GB with a paid key). Numeric text columns need try_cast(col AS double). When a daily limit is reached the error message gives the address for a paid key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SQL statement, for example: SELECT publication_year, count(*) FROM govblock_scholarly.openalex_works GROUP BY 1 ORDER BY 1 |