Tools Catalog / WordPress tools / wp_set_featured_image

wp_set_featured_image tool reference for StifLi Flex MCP

Write
Group PostsCapability edit_posts

assigns or removes the featured image of a post. If `attachment_id` is `0`, it removes the image.

Description

assigns or removes the featured image of a post. If `attachment_id` is `0`, it removes the image.

What it is for

  • Automating featured images after uploading or generating media.
  • Fixing posts that are missing thumbnails.

Example use case

attaching a generated hero image.

Sample prompt

Set attachment ID 981 as the featured image for post ID 245.

Sample response

{
  "tool": "wp_set_featured_image",
  "status": "ok",
  "updated": true
}

What does wp_set_featured_image do?

assigns or removes the featured image of a post. If `attachment_id` is `0`, it removes the image.

Does wp_set_featured_image modify site data?

Yes. It is a write operation and can create, update, or delete data depending on arguments.

Which capability is commonly required?

It usually runs under controls compatible with edit_posts and the active MCP profile.

How should wp_set_featured_image be used safely?

Enable write confirmations, test in staging first, and keep changelog/rollback enabled.