db_query
db_queryExecutes a single read-only SQL statement (SELECT, SHOW, DESCRIBE, or EXPLAIN) against the WordPress database to inspect data safely; include LIMIT to control result size.
Instructions
Run a read-only SQL query (SELECT / SHOW / DESCRIBE / EXPLAIN, one statement). Use LIMIT.
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": "db_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SQL statement |