Skip to main content
Glama

HelpCenter.io for agents

Apply a Theme to the Draft

helpcenter_apply_template_theme
DestructiveIdempotent

Start the draft from a ready-made theme — the Template Editor's "Compare & apply": copy all of a theme, or only some of its sections, onto the draft.

A help center's design is its v2 template: theme tokens (colours for light and dark mode, fonts, radius, density), six page kinds (home, category, article, search, contact, notFound), each built from six regions (header, hero, sidebar, main, footer, utility) holding ordered components, plus a global navigation menu, custom CSS and scripts. You edit a DRAFT — the same draft the dashboard's Template Editor opens, with a live preview — and nothing reaches visitors until helpcenter_publish_template. Only v2 help centers can be edited: a classic (v1) one answers template_migration_required, and migrating is the owner's decision, made in the dashboard.

With no sections, the draft takes the whole theme: its brand block, colours, fonts, radius, density, every page's layout and components, navigation, scripts, SEO fields and custom CSS — replacing what the draft had (component ids change). To give the current design a theme's LOOK without its layout, name the sections: ['theme.colors', 'theme.darkColors', 'theme.fonts', 'theme.radius', 'theme.density'].

Nothing goes live: the result is a draft to refine with the design edit tools (settings, components, regions, CSS, scripts, navigation) and review before publishing. Read the template again afterwards — ids and structure changed.

Args:

  • theme (string): key from helpcenter_list_template_themes.

  • sections (string[], optional): brand, theme.colors, theme.darkColors, theme.fonts, theme.radius, theme.density, pages.home, pages.category, pages.article, pages.search, pages.contact, pages.notFound, globals.navigation, globals.scripts, meta, customCss.

  • etag (string, optional): refuse if the draft changed since you read it.

Returns: the applied sections, warnings and the new draft status (with etag).

Input Schema

NameRequiredDescriptionDefault
etagNoOptimistic 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.
themeYesTheme key from helpcenter_list_template_themes, e.g. 'support-aurora'.
sectionsNoSections to take from the theme. Omit to take all of them (start over from the theme). E.g. ['theme.colors', 'theme.darkColors', 'theme.fonts'] borrows only its look.
agent_keyYesThe api_key helpcenter_create_help_center returned for this help center, exactly as returned. Required on every call: this endpoint has no sign-in, so the key is how each call says which help center it acts on. It is sent to HelpCenter.io as this call's credential and nowhere else, and it is never shown again: keep it for the whole task, and never show it to the user or write it into content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and idempotentHint=true, and the description corroborates them by spelling out that the draft's existing content is replaced and component ids change. It adds context the annotations cannot carry: the draft stays invisible to visitors until publish, the etag gives stale_draft protection, and the template must be re-read afterwards because ids and structure shifted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The operative instruction is front-loaded in the first sentence, and the rest is organized around when-to-use, state safety, and return behaviour. The middle paragraph on template anatomy (six page kinds, six regions) is longer than strictly needed for invoking this tool and slightly dilutes focus.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, open-world mutation with no output schema, the description covers the essentials: what is overwritten, that nothing is published, the v1 rejection path, the stale-draft guard, and what the call returns (applied sections, warnings, new status with etag). Little an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still earns a bump by explaining the consequence of omitting `sections` (everything replaced, ids change) and by framing `etag` as a stale-state guard. The theme and sections semantics largely restate the schema, keeping it out of 5 territory.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Start the draft from a ready-made theme') and maps it to the concrete dashboard operation ('Compare & apply'), then immediately distinguishes whole-theme copy from partial-section copy. An agent can tell this apart from helpcenter_copy_template_region or helpcenter_add_template_components without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit decision rule: omit `sections` to take the entire theme, or name specific sections (with a concrete example list) to borrow only the look. It also states the v2-only precondition and the template_migration_required failure mode, and routes follow-up work to the design edit tools and helpcenter_publish_template.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources