database_query
Runs one read-only SQL statement (SELECT, WITH, VALUES or TABLE) against a Product's database and returns the rows as JSON. It runs as the Product's own database role inside a READ ONLY transaction with a 15 second timeout, so it cannot change anything and cannot see another Product's data. At most limit rows come back (default 100, maximum 1000); truncated says whether there were more. Use it to inspect schema (information_schema.columns) and data before deciding on a change, then database_execute to change it. Reads are not audited.
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": {
"productId": "<productId>",
"databaseId": "<databaseId>",
"sql": "<sql>"
},
"name": "database_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One statement. A trailing semicolon is fine; a second statement is refused. | |
| limit | No | Most rows to return. | |
| productId | Yes | Product identifier, e.g. prd_7k2m9x4qw1nv8bz3ct6d. | |
| databaseId | Yes |