Skip to main content
Glama

WooCommerce: Set featured image

woocommerce_set_featured_image
Destructive

Assign an existing media library item as the featured image for a WordPress or WooCommerce post by specifying the site, post ID, and media ID.

Instructions

[UNIFIED] Set a WordPress post's featured image to an existing media library item.

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": {
      "site": "<site>",
      "post_id": "<post_id>",
      "media_id": "<media_id>"
    },
    "name": "woocommerce_set_featured_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes
post_idYes
media_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, so the safety profile is covered. The description adds the meaningful constraint that the media item must already exist in the library. It does not disclose that an existing featured image is replaced or whether the previous attachment is affected — the very behavior implied by destructiveHint=true.

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?

One sentence, front-loaded with the action and resource, with no padding beyond the "[UNIFIED]" tag noise. It is efficiently written; the problem is missing content, not excess.

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

Completeness2/5

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

For a destructive mutation with three entirely undocumented parameters and no output schema, the description is too thin. It omits replacement behavior, permission/auth needs, and what is returned, so an agent cannot predict side effects before calling.

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

Parameters2/5

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

Schema description coverage is 0% for all three required parameters, so the description carries the full burden and mostly fails: site, post_id, and media_id get no format, valid-range, or ownership semantics. Only the implicit hint that media_id refers to an existing library item adds anything. This is below the baseline expected when structured documentation is absent.

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?

"Set a WordPress post's featured image" is a specific verb+resource and the clause "to an existing media library item" narrows the scope to already-uploaded media. It does not, however, distinguish itself from the sibling attach_media_to_product or explain the mismatch between the woocommerce_ prefix and the WordPress-post framing. Purpose is clear, sibling differentiation is absent.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no named alternative. An agent has to guess whether this is the right tool versus attach_media_to_product or generate_and_upload_image when a post or product needs an image.

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