Skip to main content
Glama

Update content

update_content

Update WordPress content by ID via full-body replacement or targeted find/replace edits that fail loudly on no match, keeping long pages intact.

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" 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 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 REST base, e.g. {"categories": [3], "tags": ["news"]}. Names that do not exist yet are created.
titleNoThe title, as plain text.
authorNoUser ID of the author.
formatNoPost format: standard, aside, gallery, link, image, quote, status, video, audio, chat.
parentNoParent ID, for hierarchical types such as pages.
statusNopublish | future | draft | pending | private | trash.
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.
templateNoPage template file, e.g. "templates/full-width.php".
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. Upload it with create_media first.
Behavior5/5

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

The description discloses critical behavioral traits beyond the annotations: that edits apply in order, that a non-matching edit 'fails loudly rather than silently writing nothing,' that the 'required' flag defaults to true, and that content/edits are mutually exclusive. It also explains the scope of meta writes. These details materially shape an agent's expectations and are not provided by the annotations.

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?

The description is a single, well-structured paragraph. Each sentence earns its place: the opening states the core action, then the two modes are contrasted, followed by a concrete recommendation and a failure-behavior note. No filler or redundancy.

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?

Given the tool has 22 parameters and no output schema, the description effectively covers the most crucial aspects—update mechanisms, ordering, failure handling, and cautionary notes. It does not describe the expected response object, but for an update tool the implicit return of updated content is conventional and the schema covers parameter details. A small gap remains around concurrency or explicit success indicators, but overall it is comprehensive for practical use.

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?

The schema already documents all 22 parameters with high coverage, so the baseline is 3. The description adds meaningful semantic guidance for the key parameters—especially 'content' vs 'edits' and their behavioral implications—plus the tip to read content first due to HTML comments. However, it does not add new meaning for all parameters, so a 4 reflects the value added beyond schema, not a perfect treatment of each parameter.

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 states a precise verb and resource: 'Update any content type by ID.' It immediately distinguishes the two update modes (content vs edits) and clearly differentiates from siblings like create_content, delete_content, and bulk_update_content by specifying both modes. This is unambiguous and actionable.

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?

It gives explicit guidance on when to use 'edits' vs 'content', recommending 'edits' for small changes (heading, price, one paragraph) as safer on long pages, and implies 'content' for wholesale replacement. It also warns about slug changes breaking links and notes the fallback for unregistered meta keys. This is clear, practical routing.

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/alokemajumder/wpxmcp'

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