safe_query
Execute SELECT-only SQL queries on dataset tables with automatic blocking of destructive commands and a maximum 500-row limit.
Instructions
Execute a SELECT-only SQL query against a dataset table.
Safety: DROP/DELETE/UPDATE/INSERT/CREATE/ALTER/INSTALL/LOAD and other dangerous keywords are blocked. LIMIT is auto-applied if missing (max 500 rows).
Args: query_id: Dataset ID (for validation context) sql: A SELECT SQL query, e.g. "SELECT id, sentiment FROM social_posts LIMIT 10" limit: Max rows to return (capped at 500)
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": {
"query_id": "<query_id>",
"sql": "<sql>"
},
"name": "safe_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes | ||
| sql | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |