query_sql
Execute a read-only SELECT query against the Chinook SQLite database. Returns column names, row count, and up to 100 rows.
Instructions
Execute a single SELECT statement against the database and return results.
This tool is READ-ONLY: INSERT, UPDATE, DELETE, DROP, and any other non-SELECT statement will be rejected. Multiple statements chained with semicolons will also be rejected — send one SELECT at a time.
Returns an object with: columns (list of column names), row_count, rows (list of row objects), and truncated (true if there were more than 100 rows, in which case only the first 100 are returned).
If you don't know the schema, call list_tables and describe_table FIRST. Never invent column or table names — verify them by describing the tables involved.
Args: sql: A single, valid SQLite SELECT statement. Use standard SQL. You may include JOIN, WHERE, GROUP BY, ORDER BY, LIMIT, and aggregate functions. Do not include a trailing semicolon.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes |