Skip to main content
Glama

WooCommerce: Upload and attach to product

woocommerce_upload_and_attach_to_product
Destructive

Upload an image from base64 data or a URL and attach it to a WooCommerce product in a single call, setting gallery role, alt text, and filename.

Instructions

[UNIFIED] Upload a single image (from base64 or URL) and attach it to a WooCommerce product in one call.

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>",
      "product_id": "<product_id>",
      "source": "<source>",
      "filename": "<filename>"
    },
    "name": "woocommerce_upload_and_attach_to_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
dataNo
mimeNo
modeNoappend
roleNogallery
siteYes
sourceYes
alt_textNo
filenameYes
product_idYes
skip_optimizeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

C2.7/5.0
Behavior2/5

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

Annotations declare destructiveHint=true and idempotentHint=false, so the description should warn what gets modified and what is irreversible. It never mentions that images are appended to the product gallery, that the 'mode' default is 'append', that 'skip_optimize' implies default recompression/mutation of the file, or any size/MIME limits — all material for a destructive write with 11 parameters at 0% schema coverage.

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?

A single front-loaded sentence with no filler; the verb and resource come first and the source alternatives are stated compactly. The brevity is efficient in form even though the underlying complexity goes unaddressed.

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 an 11-parameter destructive mutation with no output schema and zero schema coverage, one sentence is not enough. The agent lacks guidance on required 'source' semantics, mode/role behavior, image constraints, and what the response contains after attaching.

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%, so the description must carry parameter meaning. It covers only the data/url duality ('base64 or URL'); mode, role, alt_text, mime, filename, skip_optimize, site, and product_id are entirely unexplained, including the enum-like defaults 'append' and 'gallery'.

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 verb chain (upload + attach), the resource (a WooCommerce product), the unit of work (a single image), and the accepted input sources (base64 or URL). The '[UNIFIED] ... in one call' framing hints that it collapses upload and attach into one operation, which separates it somewhat from woocommerce_attach_media_to_product, but no sibling is named explicitly.

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 explicit when-to-use or when-not-to-use guidance. An agent cannot tell from the description whether this should be preferred over woocommerce_attach_media_to_product (existing media) or woocommerce_generate_and_upload_image (generated media); the only hint is 'in one call', which is left for the reader to interpret.

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