Run one bounded read-only Dev or Prod database query
database_queryRead one owner-authorized Dev or Prod database query (at most 100 rows, five-second timeout). Explicitly choose the environment. Shared data resolves to the same physical database. Application RLS policies apply; use an authorized SQL export when a full archive is required. The statement starts with SELECT or WITH in any letter case, has no trailing semicolon and is at most 4,096 bytes, with at most 32 scalar parameters; a result over 256 KiB fails and any SQL error returns one generic 400. If the selected environment has no database, follow database_not_set_up.
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": {
"project_id": "<project_id>",
"environment": "<environment>",
"statement": "<statement>",
"parameters": "<parameters>"
},
"name": "database_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| statement | Yes | One SELECT or WITH statement in any letter case, at most 4,096 bytes, without a trailing semicolon, because it runs as a subquery. | |
| parameters | Yes | ||
| project_id | Yes | Project identifier. | |
| environment | Yes |