MCP tool · Applications
query_wp_database
Run one read-only SQL statement against a WordPress site's own database and return the rows.
query_wp_database
Read-onlyIdempotent
Description
Run one read-only SQL statement against a WordPress site's own database and return the rows. Only select, show, describe and explain are accepted — one statement, no ; except a trailing one, no into outfile; anything else is refused with validation_failed before it reaches the site, and there is no tool that runs SQL writes. Returns {prefix, columns, rows, rowCount, truncated}. prefix is this install's table prefix (e.g.
Input
| Name | Type | Description |
|---|---|---|
input
required
|
string |
A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.
|
sql
required
|
string |
One read-only statement: select, show, describe or explain (max 5000 characters, no second statement). Use the prefix from a previous result for table names, e.g.
|
path
|
string |
Optional subfolder of a WordPress install not at the domain root (e.g. blog).
|