Skip to main content
Glama

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).

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": {
      "theme": "<theme>"
    },
    "name": "helpcenter_apply_template_theme"
  }
}

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'.
site_idNoWhich 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.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered structurally. The description adds genuine context beyond them: it says exactly what gets replaced when no sections are given (including that component ids change), that the write lands only on a draft and never reaches visitors until publish, and that the template should be re-read afterwards. The etag/stale_draft refusal is documented in the schema rather than the description, which keeps this from a 4.

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?

Front-loaded with the action and the all-vs-some fork before the conceptual background on v2 templates, so an agent gets the decision-relevant content first. It is longer than needed in places — the v2 anatomy paragraph (six page kinds, six regions) is context that could be trimmed, and the section list is partly restated from the schema — but each paragraph carries usable information.

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?

No output schema exists, and the description compensates by stating the return shape (applied sections, warnings, new draft status with etag). For a destructive, open-world mutation with four parameters, it covers preconditions, blast radius, side effects and the required follow-up read, leaving no significant gap.

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, but the description goes further by explaining the semantic default of `sections` (omitted means everything, equivalent to starting over) and by giving a concrete recipe for the 'look without layout' case. The `theme` parameter is tied to helpcenter_list_template_themes and `sections` values are illustrated by purpose rather than just enumerated.

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?

States a specific verb and resource ('start the draft from a ready-made theme — copy all of a theme, or only some of its sections, onto the draft') and frames it as the Template Editor's Compare & apply, which pins down the resource precisely. It is clearly distinct from helpcenter_list_template_themes (source of the key) and the design edit tools named for refinement.

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?

Explicit when-to-use branching: omit `sections` to take the whole theme, or name a specific list to borrow only the look without layout, complete with the exact array to pass. It also states a hard precondition (only v2 help centers; classic ones answer template_migration_required and migration is the owner's decision) and the follow-up path (refine with edit tools, then 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