ab1cfc88da
Hermes Agent plugin that drives WordPress sites running the WordVibe plugin over the site MCP server (POST /wp-json/wp-ide/v1/mcp, Bearer key from Settings -> MCP). 8 lean tools (sites, site_info, tools, call, read_file, write_file, edit_file, search) + /wordvibe slash command + bundled skill. The site exposes ~100 tools; the rest are reachable via wordvibe_call to keep the per-turn schema small. Verified against a mock of the plugin JSON-RPC server: 15/15 scenarios (initialize, tools/list, tools/call, blocked tools, unknown tool, 403 when MCP off, connection refused, plain-permalink ?rest_route= fallback).
58 lines
3.0 KiB
Markdown
58 lines
3.0 KiB
Markdown
---
|
|
name: wordvibe-sites
|
|
description: "Use when driving a WordPress site through the WordVibe plugin (wordvibe_* tools). Covers site selection, read-before-write, snapshots/rollback, and which site tools to reach for."
|
|
version: 1.0.0
|
|
author: WordVibe
|
|
license: MIT
|
|
metadata:
|
|
hermes:
|
|
tags: [wordpress, wordvibe, mcp, files, agents]
|
|
---
|
|
|
|
# Driving WordPress with the wordvibe_* tools
|
|
|
|
The `wordvibe_*` tools talk to the MCP server inside the **WordVibe** WordPress plugin. One
|
|
configured site is the default; when several are configured, pass `site` (name or URL).
|
|
|
|
## Order of operations
|
|
|
|
1. `wordvibe_sites(probe=true)` — confirm the site(s) and that MCP is reachable.
|
|
2. `wordvibe_site_info` — WordPress version, active theme, plugin count, WordVibe plugin version.
|
|
3. `wordvibe_tools` — the catalogue. Filter it (`filter="post"`, `filter="security"`) when hunting.
|
|
4. Do the work with the wrappers, or `wordvibe_call` for anything without a wrapper.
|
|
|
|
## Rules that keep you out of trouble
|
|
|
|
- **Read before write.** `wordvibe_read_file` first, then `wordvibe_edit_file` (targeted
|
|
`search` → `replace`) rather than `wordvibe_write_file` (full overwrite). Read again after a batch
|
|
of edits.
|
|
- **Snapshots exist.** Every save on the site captures the previous version. If you break something,
|
|
`wordvibe_call` with `rollback_list`, then `rollback_restore`. Say so to the user instead of
|
|
improvising a fix.
|
|
- **`db_query` is SELECT-only**; `db_mutate` and `php_eval` are blocked over MCP by design. If a task
|
|
truly needs SQL writes or code execution, tell the user it has to be done in the site's own UI.
|
|
- **`cli_exec` runs WP-CLI** on the site (`wp plugin list`, `wp post list …`). Prefer the dedicated
|
|
tools (`plugin_list`, `post_list`) — they return structured output.
|
|
- **Never invent paths.** `list_directory` and `file_search` (or `wordvibe_search`) resolve the real
|
|
layout; `get_file_info` confirms a file exists.
|
|
- **Writes are live.** They hit a production site. Before a destructive or wide change, state what
|
|
you're about to change and why, and keep the change minimal.
|
|
|
|
## Common tasks → tools
|
|
|
|
| Task | Call |
|
|
|---|---|
|
|
| Find code | `wordvibe_search(query="add_filter", include="*.php")` |
|
|
| Inspect a plugin | `wordvibe_call(tool="plugin_list")`, then `list_directory path="wp-content/plugins/<slug>"` |
|
|
| Read/update a post | `wordvibe_call(tool="post_list")` → `wordvibe_call(tool="get_post")` → `update_post` |
|
|
| Database lookups | `wordvibe_call(tool="db_query", arguments={"sql":"SELECT COUNT(*) FROM wp_posts"})` |
|
|
| Security sweep | `wordvibe_call(tool="security_scan_installed")` |
|
|
| Roll back an edit | `wordvibe_call(tool="rollback_list")` → `rollback_restore` |
|
|
| Site basics | `wordvibe_call(tool="site_info")`, `theme_list`, `plugin_list` |
|
|
|
|
## Multi-site
|
|
|
|
With `WORDVIBE_MCP_SITES` configured, name the target explicitly on every call — do not let a default
|
|
silently decide which client's site you just wrote to. When the user says "my site" and more than one
|
|
is configured, ask which one before writing anything.
|