Query database (read-only)
fabrement-query-databaseREAD-ONLY SQL (one SELECT/SHOW/DESCRIBE/EXPLAIN; a LIMIT is added) to investigate what the site holds — counts, content and meta keys. Raw options, users, usermeta and sitemeta tables are not accessible because they contain credentials. Include meta_key when selecting meta_value; unidentified or sensitive values come back [redacted]. Comments and multiple statements are refused; SHOW is limited to TABLES/COLUMNS/INDEX/TABLE STATUS/CREATE TABLE; a statement is stopped after 10 seconds. Prefer the dedicated list-* tools where one exists; never a substitute for a write.
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": "fabrement-query-database"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only statement (SELECT / SHOW / DESCRIBE / EXPLAIN). | |
| limit | No | Row cap (default 50, max 500). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | The statement as executed (with the LIMIT applied). | |
| rows | Yes | ||
| columns | No | ||
| rowCount | Yes | ||
| truncated | No | True when the row cap was reached — narrow the query. |