| name | sql |
| description | Runs SQL queries against the WordPress development database. Use when inspecting tables, checking event data, or debugging database issues. |
| disable-model-invocation | true |
| allowed-tools | Read, Bash |
Run SQL Queries
Run SQL queries against the WordPress development database.
Security: Development database only. Always confirm UPDATE/DELETE with user first.
Command Pattern
docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "YOUR_SQL_HERE"
Credentials are in CLAUDE.local.md under "Database Access".
Common Queries
docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "SHOW TABLES;"
docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "SELECT * FROM wp_simple_history ORDER BY id DESC LIMIT 10;"
docker compose exec mariadb mysql -u<USER> -p<PASSWORD> <DATABASE> -e "DESCRIBE wp_simple_history;"
Table Prefixes
| Prefix | Installation |
|---|
wp_ | Main install |
wp_nightly_ | Nightly build |
wp_multisite_ | Multisite |
Simple History Tables
wp_simple_history - Main events table
wp_simple_history_contexts - Event context/metadata
Workflow
- Read credentials from
CLAUDE.local.md
- Ask user for query (if not specified)
- Run query and display results
- For UPDATE/DELETE: Always confirm with user first