Skip to main content
Glama

Update content

update_content

Update WordPress content by ID with full-content replacement or targeted find/replace edits. For small changes, use edits to avoid altering the rest of the document.

Instructions

Update any content type by ID. Supply content to replace the body wholesale, or edits for targeted find/replace changes that leave the rest of the document untouched — the latter is safer on long pages and is what you should reach for when changing a heading, a price, or one paragraph. An edit that matches nothing fails loudly rather than silently writing nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe content ID to update.
dateNoPublish date in site time, ISO 8601 (2026-01-31T09:00:00). With status "future" (or "publish" and a future date) this schedules the post.
metaNoCustom fields, as key/value pairs. A key only writes if it is registered with show_in_rest — use set_content_meta for unregistered keys.
slugNoURL slug. Changing this on published content breaks existing links unless you add a redirect.
typeNoContent type of that ID.post
editsNoTargeted find/replace edits applied to the existing raw content, so you can change one paragraph without resending the whole document. Edits apply in order. Mutually exclusive with `content`.
termsNoTaxonomy assignments keyed by taxonomy slug or REST base, e.g. {"categories": [3], "tags": ["news"]}. Replaces the item's terms in each taxonomy given. Names that do not exist yet are created.
titleNoThe title, as plain text.
authorNoUser ID of the author.
formatNoPost format. Only applies to types that support post formats.
parentNoParent ID, for hierarchical types such as pages. 0 for none.
statusNopublish | future | draft | pending | private | trash. "future" needs a `date` in the future. "trash" moves the item to the trash (same as delete_content without force).
stickyNoPin the post to the top of the blog. Posts only.
contentNoFull content body, replacing whatever is there. For the block editor this is block markup (<!-- wp:paragraph --><p>…</p><!-- /wp:paragraph -->); classic content is plain HTML. Use `edits` instead for a small change.
excerptNoHand-written excerpt.
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
passwordNoPassword-protect the content. Empty string removes the password.
templateNoPage template file, e.g. "templates/full-width.php". Empty string for the default template.
menu_orderNoSort order for hierarchical types.
ping_statusNoWhether pingbacks and trackbacks are accepted.
comment_statusNoWhether comments are open on this item.
featured_mediaNoAttachment ID of the featured image, or 0 to remove it. Upload it with create_media first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed25 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / author / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / author / minimum
      Added value: +-9007199254740991
    • changedInput schema / properties / date / description
      Previous value: -"Publish date in site time, ISO 8601 (2026-01-31T09:00:00). With status \"future\" this schedules the post."New value: +"Publish date in site time, ISO 8601 (2026-01-31T09:00:00). With status \"future\" (or \"publish\" and a future date) this schedules the post."
    • changedInput schema / properties / edits / description
      Previous value: -"Targeted find/replace edits applied to the existing content, so you can change one paragraph without resending the whole document. Edits apply in order. Mutually exclusive with `content`."New value: +"Targeted find/replace edits applied to the existing raw content, so you can change one paragraph without resending the whole document. Edits apply in order. Mutually exclusive with `content`."
    • removedInput schema / properties / edits / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / featured_media / description
      Previous value: -"Attachment ID of the featured image. Upload it with create_media first."New value: +"Attachment ID of the featured image, or 0 to remove it. Upload it with create_media first."
    • addedInput schema / properties / featured_media / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / featured_media / minimum
      Added value: +0
    • changedInput schema / properties / format / description
      Previous value: -"Post format: standard, aside, gallery, link, image, quote, status, video, audio, chat."New value: +"Post format. Only applies to types that support post formats."
    • addedInput schema / properties / format / enum
      Added value: +[
      +  "standard",
      +  "aside",
      +  "chat",
      +  "gallery",
      +  "link",
      +  "image",
      +  "quote",
      +  "status",
      +  "video",
      +  "audio"
      +]
    • addedInput schema / properties / id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / id / minimum
      Added value: +1
    • addedInput schema / properties / menu_order / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / menu_order / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / meta / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / parent / description
      Previous value: -"Parent ID, for hierarchical types such as pages."New value: +"Parent ID, for hierarchical types such as pages. 0 for none."
    • addedInput schema / properties / parent / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / parent / minimum
      Added value: +0
    • changedInput schema / properties / password / description
      Previous value: -"Password-protect the content."New value: +"Password-protect the content. Empty string removes the password."
    • changedInput schema / properties / status / description
      Previous value: -"publish | future | draft | pending | private | trash."New value: +"publish | future | draft | pending | private | trash. \"future\" needs a `date` in the future. \"trash\" moves the item to the trash (same as delete_content without force)."
    • changedInput schema / properties / template / description
      Previous value: -"Page template file, e.g. \"templates/full-width.php\"."New value: +"Page template file, e.g. \"templates/full-width.php\". Empty string for the default template."
    • changedInput schema / properties / terms / description
      Previous value: -"Taxonomy assignments keyed by taxonomy REST base, e.g. {\"categories\": [3], \"tags\": [\"news\"]}. Names that do not exist yet are created."New value: +"Taxonomy assignments keyed by taxonomy slug or REST base, e.g. {\"categories\": [3], \"tags\": [\"news\"]}. Replaces the item's terms in each taxonomy given. Names that do not exist yet are created."
    • addedInput schema / properties / terms / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Beyond annotations, the description discloses that edits leave the rest of the document untouched and that a non-matching edit fails loudly instead of silently no-oping. It also makes the overwriting nature of `content` clear. This adds meaningful behavioral context that the annotations alone do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core purpose, then the mode selection, then the failure guarantee. Every sentence earns its place and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 22-parameter tool with a rich schema and no output schema, the description covers the key conceptual decision (content vs edits) and an important failure mode. It doesn't mention when to prefer bulk_update_content, but the schema covers the remaining parameter details adequately.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds high-level guidance about the content/edits tradeoff, but per-parameter semantics are already thoroughly covered in the schema. It does not add new parameter-level detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Update any content type by ID') and clearly explains the two update modes. It does not explicitly distinguish itself from the sibling bulk_update_content, but the singular 'by ID' framing is strong enough to make the core purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear, actionable guidance on when to use `content` vs `edits` — recommending targeted edits for small changes like a heading or price, and wholesale replacement otherwise. It does not mention alternative tools like bulk_update_content, but the internal mode selection is explicit and well-contextualized.

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

Deploy Server

Other Tools