Skip to main content
Glama

update_content

Idempotent

Save fields into a content item's working draft; nothing goes live until publish_content. Each value's shape follows its field type (list_content_types {name} gives valueFormat): text/markdown → string; richtext → TipTap doc…

Instructions

Save fields into a content item's working draft; nothing goes live until publish_content. Each value's shape follows its field type (list_content_types {name} gives valueFormat): text/markdown → string; richtext → TipTap doc {type:'doc',content:[…]}; contentArea → array of block instances; reference → {documentId}; image → asset documentId. data is MERGED over the draft by default, so omitted fields are kept; merge:false replaces the whole map (send every required field, and the get_content revision so a concurrent human edit is refused with 409 instead of overwritten). For one LONG text/markdown value use set_field: nested long strings can be mangled in transit. A value of the wrong shape is refused with the field, the expected shape and an example; text in another language than the branch is refused unless allowLanguageMismatch. An agent's edit marks the draft for review and cancels a pending scheduled publish of it. Returns the saved draft in the get_content shape, with its new revision. Requires the content.update permission (Admin, Editor, Author — an Author only within their own sections).

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": {
      "documentId": "<documentId>",
      "data": "<data>"
    },
    "name": "update_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesField name → value, shaped per the valueFormat list_content_types {name} reports. Pass {} to change only name/slug/displayInNav.
nameNoNew display name. Omit to keep it.
siteNoSite slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content.
slugNoNew URL slug for a page; publishing it adds a 301 from the old URL automatically. Omit to keep it.
mergeNoDefault true: shallow-merge data over the current draft. false = replace the whole field map
localeNoLocale code. Omit for the document's own locale (its site-default variant, else its only variant).
revisionNoOptimistic concurrency: the `revision` from get_content. If a human (or another agent) has changed the draft since, the write is refused instead of overwriting their work. Recommended whenever merge:false
documentIdYesThe item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content.
displayInNavNoWhether the page appears in the site navigation. Omit to keep it.
allowLanguageMismatchNoSet true ONLY to deliberately write text whose language differs from the locale branch (the guard otherwise refuses, so e.g. Norwegian text can't silently land on the 'en' branch)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.4
    • changedInput schema / properties / data / description
      Previous value: -"Field name → value, shaped per get_content_type's valueFormat. Pass {} to change only name/slug/displayInNav."New value: +"Field name → value, shaped per the valueFormat list_content_types {name} reports. Pass {} to change only name/slug/displayInNav."
    • changedInput schema / properties / documentId / description
      Previous value: -"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."New value: +"The item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content."
  2. Changed5 schema fields changedv0.1.3
    • addedInput schema / properties / data / description
      Added value: +"Field name → value, shaped per get_content_type's valueFormat. Pass {} to change only name/slug/displayInNav."
    • addedInput schema / properties / displayInNav / description
      Added value: +"Whether the page appears in the site navigation. Omit to keep it."
    • changedInput schema / properties / documentId / description
      Previous value: -"Content documentId"New value: +"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."
    • addedInput schema / properties / name / description
      Added value: +"New display name. Omit to keep it."
    • addedInput schema / properties / slug / description
      Added value: +"New URL slug for a page; publishing it adds a 301 from the old URL automatically. Omit to keep it."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are modest (idempotent, non-destructive), and the description adds substantial unrevealed behavior: merge-by-default semantics, the 409 refusal on stale revision, that an agent edit marks the draft for review and cancels a pending scheduled publish, the shape-mismatch refusal, the language guard, and the required permission set. This is well beyond what annotations supply.

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?

A single dense block, but front-loaded with the core purpose and merge rule before the edge cases. Nearly every clause carries actionable information; the long run-on construction around the field-shape list and the set_field aside slightly hurts scanability.

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 10-parameter nested-object mutation with no output schema, the description covers the required permission, the return shape ('the saved draft in the get_content shape, with its new revision'), the concurrency contract, and the main refusal modes. Nothing needed 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 is 3, but the description contributes real meaning not in the schema: concrete value shapes per field type (string, TipTap doc, block array, {documentId}), the merge:false consequence, and the revision/409 contract. It does not fully re-explain name, slug, or locale handling, which holds it below a 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 ('Save fields into a content item's working draft') and immediately scopes it against publish_content ('nothing goes live until publish_content'). An agent can distinguish it from create_content and set_field without opening a schema.

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 routing conditions: use set_field for one long text/markdown value, use merge:false plus revision to replace the whole map, use allowLanguageMismatch only for deliberate cross-language writes. When-not guidance (draft vs live) is front-loaded.

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