Skip to main content
Glama

Update Content

update_content
DestructiveIdempotent

Modify existing content items in LightCMS by updating specific fields, preserving unchanged data, and automatically creating version history for tracking changes.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoContent category
clear_fieldsNoField names to clear to empty string (removes ambiguity about how to delete field content)
dataNoTemplate field values
dry_runNoIf true, validate the update without saving
folder_pathNoFolder path
idYesContent ID (MongoDB ObjectID),required
meta_descriptionNoSEO meta description
og_imageNoOpen Graph image URL
raw_modeNoUse raw HTML mode
set_raw_modeNoSet to true to explicitly update raw_mode (needed to set it to false)
set_use_footerNoSet to true to explicitly update use_footer (needed to set it to false)
set_use_headerNoSet to true to explicitly update use_header (needed to set it to false)
set_use_themeNoSet to true to explicitly update use_theme (needed to set it to false)
slugNoURL slug
tagsNoTags for lc:query index pages
template_idNoTemplate ID (MongoDB ObjectID)
titleNoContent title
use_footerNoInclude site footer
use_headerNoInclude site header
use_themeNoApply site theme/layout
version_commentNoOptional comment describing this version change
Behavior5/5

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

Annotations cover idempotency/destructiveness, but description adds crucial behavioral context: automatic versioning ('Creates a new version automatically'), merge semantics for partial data updates, clear_fields deletion mechanism, dry_run validation mode, and concurrency limits (20 calls). Also documents rich markup features (Wikilinks, includes, hashtags) and template capabilities.

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?

Lengthy but well-structured and front-loaded. Core mechanics (ID-based update, versioning, partial updates) appear first. Specific parameter behaviors follow. Alternatives and limits come next. Advanced content features (markup, templates) appropriately placed at end. Every sentence provides distinct value despite length.

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?

Comprehensive coverage for a complex 21-parameter destructive operation. Documents versioning behavior, update semantics (merge vs clear), validation mode, concurrency limits, and content format capabilities. No output schema exists, but description sufficiently covers invocation behavior and side effects.

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 has 100% coverage (baseline 3). Description adds significant usage context: explains merge semantics for 'data' field, demonstrates 'clear_fields' array syntax, clarifies 'dry_run' validation purpose, and provides a concrete JSON example showing parameter interaction.

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 specific verb 'Update' + resource 'content item' + identifier 'by ID'. Explicitly distinguishes from sibling 'update_content_by_path' ('To update by URL path instead of ID, use...') and 'bulk_update_content' ('For larger batches...prefer bulk_update_content').

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?

Provides explicit when/when-not guidance: use sibling for path-based updates, use bulk tool for >20 items, use dry_run for validation, and always include version_comment. Clear guidance on partial vs full updates ('Only send fields you want to change').

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

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