page_add_content
Create a content area with linked text on a fresh page. Defaults to 'body' area; set force=true to bypass duplicate name check.
Instructions
Create a content area + linked text on a page (POST /pages/{id}/contents). Use this on freshly-created pages where /contents returns [] until the admin UI's edit-mode opens the page. name must match the layout's {% content %} tag — default 'body' for unnamed, 'gallery_1' for named. content_type defaults to 'text'; valid values: text, gallery, form, content_partial, buy_button, code.
By default, the tool first GETs /pages/{id}/contents and refuses if a content area with the same name already exists — calling twice with the same name was silently creating duplicates. To edit the existing area, use text_update on its text.id. Pass force=true to skip the pre-check (legitimate use: page templates with multiple areas sharing the same name).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| page_id | Yes | ||
| name | No | Content area name (default 'body'; named areas match {% content name="..." %}) | body |
| content_type | No | text | |
| force | No | Skip the duplicate-name pre-check. Default false: the tool refuses to create a second area with a name that already exists on the page. Set true only when the layout legitimately uses repeated names. |