query
Execute read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN) and get results, supporting database selection, row limits, and connection names.
Instructions
Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN) and return results.
Args: sql: SQL query to execute. database: Name of the database within the connection (optional). max_rows: Maximum number of rows to return (default: 100). connection_name: Name of the database connection (default: "default").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| database | No | ||
| max_rows | No | ||
| connection_name | No | default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |