Run ONE bounded read against a site's database.
One statement, beginning with SELECT, SHOW, DESCRIBE or EXPLAIN, with no
second statement and no data-modifying clause anywhere in it. The container
proves the statement is a read before running it and caps the result: 200
rows by default, 1000 maximum, 2 MB of cell data. `truncated` in the
response says whether a cap was reached.
⚠ THIS TOOL CANNOT CHANGE ANYTHING, AND RETRYING WITH DIFFERENT WORDING WILL
NOT MAKE IT. Anything that is not a single bounded read is refused with
READ_ONLY and nothing runs. To change data or schema, use the tool for the
job: optimize_database, database_search_replace, manage_db_user,
list_databases, list_tables — and for creating, altering, dropping,
importing or exporting tables, the database manager in the control panel,
which has no tool here.
Requires: API key with write scope (unchanged — the scope is the customer's
published permission for this operation, not a claim about what it does).
Args:
slug: Site identifier
database: Database name
query: One read statement
Returns:
{"columns": ["id", "user_email"], "rows": [[1, "a@example.com"], ...],
"row_count": 1, "truncated": false, "execution_time_ms": 12.0}
Errors:
READ_ONLY: Not a single bounded read. The error text carries the
explanation and names the operation to use instead.
ConnectorNo auth