Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LIGHTCMS_URLNoServer URL where LightCMS is running.http://localhost:8082
LIGHTCMS_API_KEYYesAPI key generated from the LightCMS admin panel (required for stdio mode).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
archive_fork

Archive a fork without merging it. The fork and its pages are preserved but the fork becomes read-only. Requires admin role.

bulk_field_operation

Apply a single field operation to all matching content pages in one call.

Operations:

  • clear: set field to empty string

  • set: replace field value with a fixed string

  • prepend: add text before existing field value

  • append: add text after existing field value

  • wrap: surround existing value with before/after strings

Use scope filters to limit which pages are affected (content_ids, folder_path, template_name, category). Set dry_run: true to preview which pages would be changed without saving.

Example: {"operation": "prepend", "field": "disclaimer", "value": "Note: ", "template_name": "Blog Post"}

bulk_update_content

Update up to 100 content items in a single call. Use instead of calling update_content in a loop.

Each update in the array specifies the content ID and only the fields you want to change (merge semantics on data). Use clear_fields to explicitly clear field values to empty string. Set dry_run: true to validate all IDs exist without committing changes.

Returns: total attempted, succeeded, failed counts, and per-item success/error details.

Tip: call list_content with include_data: true first to get IDs + current field values, transform as needed, then submit here. Recommended batch size: up to 50 per call for optimal performance.

create_collection

Create a new content collection. Collections display grouped content with custom templates.

create_content

Create a new content item. Requires a template_id, title, slug, and the data fields defined by the template.

Workflow:

  1. Call list_templates to find the right template and its field names.

  2. Create the content with data matching those fields.

  3. Call publish_content to make it live (or set published=true here to do both in one step).

Set use_header=true, use_footer=true, use_theme=true for pages that should use the site layout. Always include version_comment to make history readable.

Content data fields support rich markup features:

  • [[Wikilinks]] and [[Page Title|display text]] — link to other pages by title or path; auto-update when paths change

  • [[include:snippet-name]] — embed a named snippet inline (reusable callouts, CTAs, disclaimers)

  • #hashtags — mention #tagname anywhere to automatically tag the page

  • Markdown fields (type "markdown") — GitHub Flavored Markdown converted to HTML at publish time Templates can use {{.lc_toc}} in their HTML layout to inject an auto-generated table of contents.

create_folder

Create a new content folder. Folders create URL path segments for organizing content.

create_fork

Create a new named fork workspace for staging content changes.

A fork is an isolated workspace where you can edit copies of live pages without affecting the public site. When ready, an admin can merge the fork to push all changes live at once.

Typical workflow:

  1. create_fork — create the workspace

  2. fork_page — copy pages you want to edit into the fork (returns a fork page ID)

  3. update_content (with the fork page ID) — make your edits

  4. merge_fork — merge all changes to the live site (admin only)

Returns the fork ID needed for subsequent fork operations.

create_redirect

Create a new URL redirect. Use 301 for permanent redirects, 302 for temporary.

create_snippet

Create a new snippet. Snippets are Go templates that render one content item in an lc:query index page. Reference by name:

create_template

Create a new template. Define fields with name, label, type (text, textarea, richtext, date, image, select), and options.

delete_asset

Delete an asset from the library. Removes both the file and database record.

delete_collection

Delete a collection. This does not delete the content in the collection.

delete_content

Soft-delete a content item. The content can be restored later. Removes the static HTML page.

delete_folder

Delete an empty folder. Cannot delete folders that contain content or subfolders.

delete_fork

Permanently delete a fork and all its pages. Cannot delete a merged fork. Requires admin role.

delete_redirect

Delete a redirect.

delete_snippet

Delete a snippet by ID.

delete_template

Delete a template. Cannot delete system templates or templates that have content using them.

end_user_search

Search published content using full-text exact match, semantic (AI) similarity, or hybrid mode. Returns page titles, paths, and snippets.

export_content

Export content items with their full field data as a structured JSON array.

Use for batch transformations: export → transform externally → re-import via bulk_update_content.

Scope filters (all optional):

  • template_name: most useful for bulk workflows, e.g. "Concept Page" or "Blog Post"

  • category, folder_path, content_ids: narrower scoping options

Use fields: ["field1", "field2"] to include only specific data fields instead of all fields.

Returns: total count and array of items with id, title, slug, full_path, template_name, published, and data.

fork_page

Copy a live page into a fork workspace so you can edit it without affecting the public site.

Provide either:

  • path: the URL path of the page (e.g. "/about", "/blog/my-post") — preferred when you know the URL

  • content_id: the MongoDB ObjectID of the content item

Returns the fork page ID. Use this ID with update_content to make edits:

  1. fork_page → get fork_page_id

  2. update_content with id=fork_page_id to edit

  3. get_content with id=fork_page_id to verify

  4. merge_fork when all edits are ready (admin only)

If the page is already in this fork, returns the existing fork copy.

get_asset

Get asset metadata by ID or path. Does not return file content (use the serve path to access the file).

get_backlinks

Find all published pages that link to the given URL path. Links are tracked automatically whenever a page is published — both [[Wikilinks]] and ordinary links in content fields are indexed.

Use this to discover which pages reference a given page (wiki-style backlink graph), assess the impact of deleting or renaming a page, or find orphaned pages with no inbound links.

Example: {"path": "/about"} returns every published page whose content contains a link to /about.

get_collection

Get a collection by ID.

get_content

Get a single content item by ID or path. Returns full content including all field data (title, slug, full_path, data fields, published state).

Prefer path when you know the URL: {"path": "/about"} Use id when you have the MongoDB ObjectID: {"id": "abc123"}

Set include_rendered=true to also receive the fully rendered HTML output (template + theme header/footer applied). Useful for verifying what visitors see without publishing.

Tip: to preview unsaved edits before publishing, use preview_content instead.

get_content_version

Get a specific version of a content item with full field data.

get_content_versions

Get the version history for a content item. Returns list of versions with timestamps.

get_folder

Get a folder by ID.

get_fork

Get details of a fork workspace including its status and list of pages.

Returns: fork metadata + array of pages (id, title, full_path, updated_at). Use the page id with get_content or update_content to read/edit fork pages.

get_site_config

Get site configuration including title templates.

get_snippet

Get a snippet by ID.

get_template

Get a single template by ID or slug. Returns full template including fields and HTML layout.

get_theme

Get current theme settings including colors, fonts, and custom HTML for header/footer.

get_theme_version

Get a specific version of theme settings with full data.

get_theme_versions

Get the version history for theme settings. Returns list of versions with timestamps.

list_asset_folders

List all unique folder paths in the asset library.

list_assets

List all assets in the asset library. Assets are files like images, documents, CSS, JS, etc.

list_collections

List all content collections. Collections group and display content by category.

list_content

List all content items with optional filters. Returns content metadata including title, path, publish status, and timestamps.

Add include_data: true to get full field data for all items in one call, or include_fields: ["field1", "field2"] to fetch only specific fields — both avoid per-item get_content calls for bulk workflows.

Up to 20 concurrent update_content calls are safe. For larger batches, prefer bulk_update_content (up to 100 items per call).

list_folders

List all content folders. Folders organize content into URL path segments.

list_forks

List all content fork workspaces. Forks let you stage changes to multiple pages as a batch before merging them live.

Each fork shows its status (active/merged/archived), page count, and who created it. Use get_fork to see the specific pages in a fork.

list_redirects

List all URL redirects configured for the site.

list_snippets

List all snippets. Snippets are reusable Go-template HTML fragments used in lc:query index page directives.

list_templates

List all available templates. Templates define content structure with fields and HTML layout.

merge_fork

Merge all pages in a fork workspace into live content. Requires admin role.

For each page in the fork:

  • If a matching live page exists (same URL): updates it with the fork content (fork wins). If the live page was edited after the fork was created, records a conflict but still merges.

  • If no live page exists at that URL: creates a new live page.

After merging, the fork status changes to "merged". Published live pages are regenerated immediately.

Returns: updated count, created count, any conflicts detected.

ALWAYS confirm with the user before merging, as this pushes changes to the live site.

pin_theme_version

Lock a theme version so it is protected from automatic pruning or accidental overwrite. Pinned versions are marked with locked=true in get_theme_versions.

Use this to preserve milestone theme states (e.g., after a major redesign) before making further changes.

Example: {"version": 5}

preview_content

Render a content item's HTML without saving or publishing. Use this to verify what a page will look like before publishing.

Also accepts optional title/data overrides to preview unsaved edits: {"id": "abc123", "data": {"body": "New text"}}

Returns rendered_html and any warnings (missing required fields, unclosed tags, unresolved placeholders).

publish_content

Publish a content item, making it visible on the public site. Generates the static HTML page.

publish_multiple

Publish multiple content items in a single call. Use this instead of calling publish_content in a loop.

Examples:

  • Publish specific pages: {"ids": ["abc123", "def456"]}

  • Publish all drafts at once: {"publish_all_drafts": true}

Returns a list of published IDs and any failures.

regenerate_all_content

Regenerate all published static HTML pages. Use after major theme or template changes.

reindex_embeddings

Regenerate vector embeddings for all published content. Required after initial setup or if embeddings become stale.

remove_fork_page

Remove a page from a fork workspace (discards the fork copy, does not affect the live page).

restore_content

Restore a soft-deleted content item. Regenerates static page if content was published.

revert_theme_to_version

Revert theme to a previous version. Creates a new version with the old data.

revert_to_version

Revert content to a previous version. Creates a new version with the old data.

scoped_search_replace_execute

Execute a search-and-replace limited to a subset of pages. ALWAYS run scoped_search_replace_preview first and show results to the user before executing.

Scope options (all optional):

  • content_ids, folder_path, template_name, category

Set auto_republish: true to immediately re-publish all previously-published pages after updating them, collapsing the execute + publish_multiple flow into one call.

Example: {"search": "old text", "replace": "new text", "folder_path": "/blog", "auto_republish": true, "version_comment": "Updated old references"}

scoped_search_replace_preview

Preview a search-and-replace limited to a subset of pages. Safer than site-wide replacement.

Scope options (all optional — leave blank to match all pages):

  • content_ids: specific page IDs

  • folder_path: pages under /blog, /docs, etc.

  • template_name: pages using "Concept Page", "Blog Post", etc.

  • category: pages with a matching category

Example: {"search": "old text", "replace": "new text", "folder_path": "/blog"}

Always run preview before execute.

search_content

Search across all content items by title or full text. Returns matching content with paths and match context.

search_replace_execute

Execute a site-wide search-and-replace across all content. Modifies every matching page permanently.

MANDATORY workflow:

  1. Run search_replace_preview and show the user which pages will be affected.

  2. Get explicit user confirmation before executing.

  3. Run search_replace_execute with a clear version_comment.

Set auto_republish: true to immediately re-publish all previously-published pages after updating them, collapsing the execute + publish_multiple flow into one call.

For targeted replacements, use scoped_search_replace_execute instead.

search_replace_preview

Preview a site-wide search-and-replace without making any changes. ALWAYS run this before search_replace_execute.

Returns: affected page count, total match count, and per-page field breakdown. For targeted replacements (a folder, template, or category), use scoped_search_replace_preview instead.

unpin_theme_version

Remove the lock from a previously pinned theme version.

Example: {"version": 5}

unpublish_content

Unpublish a content item, removing it from the public site. Removes the static HTML page.

update_collection

Update a collection's settings.

update_content

Update an existing content item by ID. Creates a new version automatically. Only send fields you want to change.

For partial data updates, only the keys you include in "data" are changed — existing keys are preserved (merge semantics). Use clear_fields: ["field1", "field2"] to explicitly set fields to empty string. Set dry_run: true to validate the update without saving. To update by URL path instead of ID, use update_content_by_path. Always include version_comment so the version history is useful.

Up to 20 concurrent update_content calls are safe. For larger batches (>20 items), prefer bulk_update_content instead.

Example: {"id": "abc123", "data": {"body": "Updated text"}, "version_comment": "Revised intro paragraph"}

Content data fields support rich markup features:

  • [[Wikilinks]] and [[Page Title|display text]] — link to other pages by title or path; auto-update when paths change

  • [[include:snippet-name]] — embed a named snippet inline (reusable callouts, CTAs, disclaimers)

  • #hashtags — mention #tagname anywhere to automatically tag the page

  • Markdown fields (type "markdown") — GitHub Flavored Markdown converted to HTML at publish time Templates can use {{.lc_toc}} in their HTML layout to inject an auto-generated table of contents.

update_content_by_path

Update content identified by its URL path instead of its ID. Useful when you know the page URL but not the MongoDB ID.

Example: {"path": "/about", "title": "About Us", "data": {"body": "Updated content"}}

Only the fields you provide are changed. Always include a version_comment describing what changed.

update_redirect

Update an existing redirect.

update_site_config

Update site configuration. Title templates support {{title}} and {{site_name}} placeholders.

update_snippet

Update an existing snippet's name and/or HTML template.

update_template

Update an existing template. Changing the HTML layout will regenerate all content using this template.

update_theme

Update theme settings. Only the fields you provide are changed — all other settings are preserved (partial update, safe to call without get_theme first).

Changing header_html or footer_html triggers background regeneration of all published pages. Changing colors, fonts, or custom_css does NOT require content regeneration.

Use pin_theme_version to protect important milestones before making major changes.

upload_asset

Upload or replace an asset in the asset library. Re-uploading to the same serve_path replaces the existing file in place — no need to delete first.

Provide file content via one of:

  • file_path: Absolute local path to the file (preferred for files >100KB — avoids MCP transport size limits)

  • data_base64: Base64-encoded file content (fine for small files)

Validates file type and MIME type for security.

upload_asset_from_url

Fetch a public URL and store it as a LightCMS asset. Useful for importing images or files from the web without downloading them locally first.

Example: {"url": "https://example.com/logo.png", "serve_path": "/assets/logo.png", "description": "Site logo"}

If serve_path is omitted, the filename is derived from the URL. Returns id, serve_path, mime_type, and size.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/jonradoff/lightcms'

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