Skip to main content
Glama

HelpCenter.io for agents

Add Custom CSS

helpcenter_add_template_css

Add a labelled block of custom CSS to the design, to restyle components, regions or the whole help center beyond what the settings offer.

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.

The CSS is scoped to the help center automatically. Target one component with [data-hc-instance-id=""] and every component of a type with [data-hc-component-type="Hero"]; the guide's 'css' topic (helpcenter_get_template_guide) lists the other hooks. Use var(--hc-color-*) rather than literal colours so dark mode keeps working, and keep text at 4.5:1 contrast: on a primary-coloured band, set text and links to var(--hc-color-on-primary). Blocks apply in order and a later one wins, so override a theme's CSS with a block of your own rather than editing the theme's. @import and javascript: URLs are stripped. This is the guide's add_css operation.

Args:

  • css (string): the CSS.

  • label (string, optional): e.g. 'Cards · hover lift'.

  • enabled (boolean, optional): default true.

  • index (integer, optional): position among the blocks; omit to append.

  • id (string, optional): an id of your choosing.

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

Input Schema

NameRequiredDescriptionDefault
idNoOptional id of your choosing for the block. Omit and one is generated (and returned).
cssYesThe CSS. Scoped to the help center automatically; see the guide's 'css' topic.
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.
indexNo0-based position among the CSS blocks (they apply in order). Omit to append.
labelNoA name for the block, e.g. 'Cards · hover lift'.
enabledNofalse keeps the block without applying it. Default true.
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 only declare readOnly=false, openWorld=true, idempotent=false, destructive=false. The description adds the facts an agent actually needs: edits land in the design draft the Template Editor opens, nothing reaches visitors until helpcenter_publish_template, @import and javascript: URLs are stripped, and a stale etag is refused with stale_draft. These are real behavioral disclosures beyond the annotation surface.

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 critical routing and safety facts are front-loaded (draft-only, publish gate, v2-only) before the styling conventions. It is dense rather than padded, though the Args list duplicates the input schema and could be trimmed without losing 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?

For a 7-parameter mutating tool with no output schema, the description covers the error path (template_migration_required, stale_draft), the return shape (new ids, warnings, draft status with new etag), and the CSS conventions ([data-hc-instance-id], var(--hc-color-*), 4.5:1 contrast). Nothing 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 would be 3, but the description adds meaning the schema does not: blocks apply in order and a later one wins, and the index/label pair is positioned as the override mechanism. The Args section largely restates the schema, which caps it below 5.

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 ('Add a labelled block of custom CSS to the design') plus the scope of what it affects ('restyle components, regions or the whole help center beyond what the settings offer'). It is clearly separable from helpcenter_update_template_css and helpcenter_remove_template_css, which the sibling list contains.

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 explicit when-to-use (restyle beyond settings), when-not (v2 only; classic answers template_migration_required), prerequisites (ids from helpcenter_get_template), and a routing rule against a sibling behavior ('override a theme's CSS with a block of your own rather than editing the theme's'). It also states the workflow gate: publish only when the customer asks.

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