Skip to main content
Glama

create_theme

Generate a complete, previewable Ghost theme on disk with custom CSS and optional Handlebars template overrides.

Instructions

Generate a complete, valid, previewable Ghost theme on disk.

Writes a ready-to-use theme (layout, home/post/page templates, page handling, the Koenig CSS classes Ghost requires, and package.json) to a local directory. Supply styles (CSS) to design the look; the site's brand accent colour is available in CSS as var(--ghost-accent-color), so the theme respects the user's existing branding.

Width convention: the base stylesheet keeps the structural chrome classes (.site-header/.site-footer/.post-feed/.post/.page) at full width and centres their contents with an inner .gh-inner wrapper. So in a custom layout, cap a region by wrapping its content in your own inner element (or reuse .gh-inner) and set max-width there -- setting it on a child of an un-capped region works, but a child can't widen past a capped parent.

Optionally override the home/post/page templates, and the default.hbs layout itself, with your own Handlebars. Stay within the previewable helper subset: {{#if}}/{{#unless}}, {{#foreach}} (with limit=/to=, but not from=), {{#post}}, partials, and bare fields like {{title}} and {{content}}. Avoid block params (as |x|) and the helpers Ghost evaluates server-side ({{#get}}, {{#match}}, {{#is}}, {{date}}) -- block params and from= are rejected outright, and the rest render blank in the local preview.

For content templates (index/post/page), layout inheritance is handled for you: the {{!< default}} directive is injected if an override omits it. A default_template override replaces the whole layout, so it MUST include {{{body}}} (where child templates inject) -- a layout without it is rejected, since every page would render empty. The stylesheet <link> and {{ghost_head}}/{{ghost_foot}} are auto-injected before </head> / </body> if you omit them, so styling, SEO, the accent colour, and members keep working. Note {{asset "built/screen.css"}} only emits the URL -- to load the CSS it must sit inside a real <link rel="stylesheet" href="{{asset "built/screen.css"}}">. See docs/theme-conventions.md for the full contract.

After generating, call preview_theme with the returned path to view it, then upload_theme to install it (activation stays manual).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesHuman-readable theme name (slugified for the package name).
stylesNoCSS appended to the base stylesheet to design the theme.
descriptionNoOptional theme description.
page_templateNoOptional Handlebars override for the page template.
post_templateNoOptional Handlebars override for the single-post template.
index_templateNoOptional Handlebars override for the home template.
default_templateNoOptional Handlebars override for the ``default.hbs`` layout. Must contain ``{{{body}}}``.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It thoroughly discloses behaviors: writes to disk, auto-injects stylesheet/ghost_head/foot, rejects certain Handlebars constructs, injects {{!< default}} if missing, and requires {{{body}}} in default_template. It also explains how styles interact with the brand accent color.

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 description is quite long but well-structured: a brief summary followed by detailed sections separated by blank lines. It is front-loaded with the core action. However, some sentences are lengthy and could be trimmed slightly for better readability.

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?

Given the tool's complexity (7 parameters, output schema exists), the description is extremely complete. It covers prerequisites (helper subset), conventions (width, style injection), rejected constructs, and post-usage steps. No gaps remain.

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

Parameters5/5

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

Schema description coverage is 100%, so baseline is 3, but the description adds significant value. It explains the styles parameter with accent color and width conventions, describes template parameters with injection rules and rejected elements, and elaborates on the default_template requirement for {{{body}}}.

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?

The description starts with a clear one-sentence summary stating it generates a complete, valid, previewable Ghost theme on disk. It then details what files are written (layout, templates, CSS, package.json). It distinguishes from sibling tools like preview_theme and upload_theme by suggesting them as next steps.

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?

The description explicitly tells when to use the tool (to generate a theme) and provides clear guidance on what Handlebars helpers are allowed vs. rejected. It suggests a workflow: generate, then preview_theme, then upload_theme. It also explains the width convention and how to handle layouts.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stemcreations/ghost-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server