nucleo-doc-create
Create WordPress pages, posts, layouts, or sections from a Nucleo document, attach one to existing content, and optionally publish or dry-run with quality checks.
Instructions
Creates a page, post, layout or section from a Nucleo document; without postType the type follows document.kind (layout and popup: nucleo_layout, section: nucleo_section). With postId it attaches the document to an existing content without a Nucleo document; on a published content an OAuth token also needs the scope nucleo:publish. The slug comes from slug, document.wp.slug or document.meta.slug, then from the title, also for drafts; a taken slug gets a suffix and a warning. Quality is checked on the page composed with the site layouts it will receive (header, footer, single or product layout), also for a new content: an h1 in the header counts. With publish true it publishes, but blocking quality issues require acknowledge. With dryRun true it does not save. Returns postId, revision and slug.
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": {
"document": "<document>"
},
"name": "nucleo-doc-create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Slug of the new content (a-z, 0-9, -). Without it the slug comes from document.wp.slug or document.meta.slug (normalized as WordPress does), then from the title. If the slug is taken, a suffix is added: the output slug and a warning say so. | |
| title | No | Required without postId. | |
| dryRun | No | ||
| postId | No | Existing content without a Nucleo document: the document is attached to it. Type, title and status stay as they are. | |
| publish | No | ||
| document | Yes | Nucleo document in compact or full form. | |
| postType | No | Without it the type comes from document.kind: layout and popup create a nucleo_layout, section a nucleo_section, any other kind a page. page and post refuse the kinds layout, popup and section. | |
| acknowledge | No | Quality issues acknowledged, with a reason. |