feat: add wordvibe_build_page (Word Page Builder over MCP)
Wraps the site tool wpb_build_page: build or update a Word Page from {kind, html} sections. The page lands as a native Word Page (payload in post meta, builder-rendered), so it stays editable and undoable in the builder. Also documents the builder tools in the bundled skill and README.
This commit is contained in:
@@ -48,8 +48,27 @@ configured site is the default; when several are configured, pass `site` (name o
|
||||
| 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` |
|
||||
| Build a page | `wordvibe_build_page(title=…, sections=[{kind, html}], status="publish")` |
|
||||
| Site basics | `wordvibe_call(tool="site_info")`, `theme_list`, `plugin_list` |
|
||||
|
||||
## Building pages (Word Page Builder)
|
||||
|
||||
`wordvibe_build_page` creates or updates a **Word Page** — a page the site's Word Page Builder owns and
|
||||
renders from its own stored payload, so it opens natively in the builder (edit, undo, redo all work).
|
||||
|
||||
- One call builds the whole page: `title`, `sections: [{kind, html}]`, optional `slug`, `status`, `post_id`.
|
||||
- Section kinds: `hero`, `features`, `pricing`, `testimonials`, `faq`, `cta`, `footer`, `gallery`,
|
||||
`contact`, `about`, `services`, `custom`. Each becomes `<section data-wpb-section="kind" data-wpb-id="sec-…">`.
|
||||
- Write inline styles rather than inventing class names — the builder preserves what you give it, but
|
||||
the site's stylesheet won't contain classes that don't exist.
|
||||
- Editing an existing page: `wordvibe_tools(filter="wpb")` lists the builder tools, then use
|
||||
`wordvibe_call` with `wpb_get_page` / `wpb_get_page_full`, `wpb_replace_section_html`,
|
||||
`wpb_add_section_to_page`, `wpb_delete_section`, `wpb_generate_page` (AI), `wpb_chat_edit_page` (AI, one
|
||||
instruction per call), `wpb_list_pages`.
|
||||
- Needs the page builder present in the site's build (WordVibe 1.0.x cloud/ide). Where it was stripped,
|
||||
the tools answer "The Word Page Builder is not available in this build of the plugin." — say so instead
|
||||
of faking it with a plain page.
|
||||
|
||||
## Multi-site
|
||||
|
||||
With `WORDVIBE_MCP_SITES` configured, name the target explicitly on every call — do not let a default
|
||||
|
||||
Reference in New Issue
Block a user