sql_query
Run a single read-only SELECT query against the demo SQLite database to retrieve data safely. Use ? placeholders with params to pass values, keeping writes and DDL blocked.
Instructions
Run a read-only SQL query against the demo database.
Only a single SELECT or WITH...SELECT statement is allowed; writes,
DDL, and multi-statement payloads are rejected before they reach
SQLite. Use ? placeholders in sql and pass values via params
rather than formatting them into the query text. Results are capped
at MCP_CONNECT_SQL_MAX_ROWS rows (see truncated in the response).
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": "sql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| params | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| row_count | Yes | ||
| truncated | Yes | True if more rows matched than were returned; narrow the query or paginate. |