Skip to main content
Glama

WooCommerce: Generate and upload image

woocommerce_generate_and_upload_image
Destructive

Generate an AI image and upload it to the WordPress media library in one call, with optional attachment to a post or featured image.

Instructions

[UNIFIED] Generate an image with an AI provider (OpenAI DALL-E, Stability, or Replicate Flux) and upload it to the WordPress media library in one call. Optionally attach to a post or set as featured image. Uses the caller's stored provider API key; falls back to server env vars if no per-user key is set.

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>",
      "provider": "<provider>",
      "prompt": "<prompt>"
    },
    "name": "woocommerce_generate_and_upload_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes
sizeNo1024x1024
modelNo
titleNo
promptYes
captionNo
qualityNostandard
alt_textNo
filenameNo
providerYes
convert_toNo
set_featuredNo
connection_idNo
skip_optimizeNo
attach_to_postNo
negative_promptNo
input_images_b64No
generate_og_variantNo

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 flag readOnly=false, destructiveHint=true and idempotentHint=false, so the write/mutation profile is covered. The description adds genuinely new context about credentials ('caller's stored provider API key; falls back to server env vars'), which matters for auth setup. It stops short of the behaviors that actually matter here: whether repeated calls create duplicate media and consume paid provider credits, and what state is left behind if upload fails after generation succeeds.

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?

Three sentences, front-loaded with the core action, no filler or marketing language. The unexplained '[UNIFIED]' prefix is the only wasted token and it is minor.

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?

This is a high-complexity tool: 18 parameters, multi-provider dispatch, a side-effecting upload, and no output schema. The description says nothing about what comes back (media ID, URL, attachment ID) or which parameters apply to which provider, leaving an agent unable to call it correctly beyond the three required fields.

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% across 18 parameters, so the description must carry the load and does not. It only illuminates provider (naming DALL-E, Stability, Replicate Flux where the schema has no enum) and gestures at attach_to_post and set_featured. Thirteen-plus parameters—size, model, quality, convert_to, connection_id, skip_optimize, negative_prompt, input_images_b64, generate_og_variant, alt_text, filename—are entirely undefined, and provider-specific support for things like negative_prompt or input_images_b64 is never hinted at.

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?

States a specific compound action: generate an image via a named AI provider and upload it to the WordPress media library, with optional post attachment or featured-image status. The verb and resource are unambiguous, but the conversation-starting '[UNIFIED]' tag is never explained and the description gives no hint of how it differs from the near-identical sibling wordpress_generate_and_upload_image.

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 at all. The description never says when to pick this over wordpress_generate_and_upload_image, wordpress_upload_media_from_base64/from_url, or woocommerce_upload_and_attach_to_product, which all occupy adjacent territory. 'Optionally attach to a post or set as featured image' describes what the tool can do, not when to choose it.

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