Add pages to a collection
add_collection_pagesOn one site of the account, named in site. A branch of a collection in one call: pages, each with the pages under it in children, any depth the levels allow — a country with its states, each state with its spots. They go on the top level, or under the page parent_id names (get_collection gives the ids). Each page is a title, Markdown for its body (create_post's Markdown), and an optional slug, subtitle, cover and the fields its level names. A cover at an outside address is fetched into the library first, once for each address. All or nothing: one page refused makes none, and the refusal names it. Drafts unless publish is true (editors and above). Up to 200 pages a call. Answers every page made in tree order, with its id, address and preview link.
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": {
"site": "<site>",
"collection": "<collection>",
"pages": "<pages>"
},
"name": "add_collection_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The site to work on, as list_sites names it | |
| pages | Yes | ||
| publish | No | Publish every page now; drafts when left out | |
| language | No | A BCP 47 tag; the parent's language, else the site's default | |
| parent_id | No | The page the branch goes under; the top level when left out | |
| collection | Yes | Its id, slug or name |