Add Components to the Design
helpcenter_add_template_componentsAdd components to pages of the draft: a Hero, a CategoryGrid, FeaturedArticles, Faqs, RichText, a CustomHtml block, a Container…
It edits the help center's design DRAFT (its v2 template): the draft the dashboard's Template Editor opens, with a live preview. Nothing reaches visitors until helpcenter_publish_template — after editing, give the customer the Template Editor link from the result to review, and publish only when they ask. v2 help centers only (a classic one answers template_migration_required). Ids come from helpcenter_get_template.
Each entry names a component type and where it goes: a page and region (header, hero, sidebar, main, footer, utility) at an index (omit to append), or parent_id to put it inside a Hero or Container. Look the type's settings up first (helpcenter_get_template_guide, topic 'components'): omitted settings keep their defaults, and a value outside the editor's options is refused. A new Hero comes with a SearchBar child. To build a container and its children in one call, give the container an id of your own and name it as parent_id in the later entries.
Placement: a banner across the top of a page goes at index 0 of the hero region (a full-bleed CustomHtml) or the top of main — not the header, which themes lay out as one fixed row. A region the outline marks "laid out by custom CSS" arranges what you add the theme's way. header and footer are usually synced (one copy on every page); adding to a synced region whose pages differ is refused until you choose with helpcenter_sync_template_region. This is the guide's add_component operation.
Args:
components (array, 1-50): {type, page?, region?, parent_id?, config?, index?, id?}.
etag (string, optional): from your last read or edit; refuses (stale_draft) if the draft changed since.
Returns: what each entry did (new ids), warnings worth relaying, and the draft status with its new etag.
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": {
"components": "<components>"
},
"name": "helpcenter_add_template_components"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etag | No | Optimistic lock: the draft etag from your last read, or the one your last edit returned. When given, the call is refused (stale_draft) if someone changed the draft since — so you never build on a state you have not seen. Omit to apply to the current draft. | |
| site_id | No | Which help center to act on: an id from helpcenter_list_sites. Needed when this connection reaches more than one help center; omit it when it reaches one. Applies to this call only — pass it on every call of a task, and ask the user which help center they mean if their request does not say. | |
| components | Yes | The components to add. Applied in order, all-or-nothing: if one is refused, nothing from this call is saved and the error names it by position (operation 0 is the first entry). |