Skip to main content
Glama

wp_upload_image

Upload an image into the site's WordPress media library and get back the HOSTED url — drop it into a sections image widget ({type:'image', url}) when building a page/post, or swap an existing image via wp_patch_page (field image.url). Hosts the image on the site instead of hotlinking. Pass EXACTLY ONE of: image_url (any public http(s) URL — jpg/png/gif/webp/avif, up to 12MB, extension optional) or image_data (base64 bytes you already have locally — no public URL needed, e.g. a file you just read, up to 5MB; pass filename as a base-name hint, the real extension is always verified server-side). image_data is PLUGIN-TRANSPORT ONLY — SSH-connected sites must host the image publicly and use image_url instead. Requires writes enabled; plugin-connected sites need Xyle Connector v0.2.1+ for image_url, v0.9.8+ for image_data (older plugins return a clear update message).

Input Schema

NameRequiredDescriptionDefault
altNoOptional alt text (SEO / accessibility)
titleNoOptional media title
site_idYesThe WordPress site ID
filenameNoBase-name hint for image_data (e.g. 'logo'). The actual file extension is always derived server-side from the verified image type, never from this value.
image_urlNoPublic http(s) URL of the image to sideload into the media library
image_dataNoBase64-encoded image bytes to upload directly (plugin-transport sites only). Mutually exclusive with image_url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give the generic write/non-idempotent/non-destructive profile. The description adds substantial behavior beyond them: writes must be enabled, plugin version floors (v0.2.1 for image_url, v0.9.8 for image_data), transport restrictions, size caps (12MB / 5MB), and server-side extension verification.

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?

Front-loaded with purpose and return value, then constraints. Dense parenthetical packing costs a little readability, but nearly every clause carries actionable information, so little is wasted.

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

Completeness5/5

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

No output schema exists, yet the description states what comes back (the hosted URL). Combined with usage rules, transport constraints, and version gating, an agent has everything needed to invoke this six-parameter tool correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: exactly-one-of mutual exclusivity, that extension is optional, that filename is only a base-name hint, and the accepted formats. It stops short of detailing alt/title/site_id behavior, which the schema already covers.

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?

States a precise verb+resource (upload an image into the site's WordPress media library) and names the return value (hosted URL). It also distinguishes itself from sibling tools by naming where the URL is consumed (sections image widget, wp_patch_page field image.url) and contrasts with hotlinking.

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?

Explicitly routes the agent: use image_url for public URLs, image_data only for plugin-transport sites, and SSH-connected sites must use image_url. It also names downstream tools (wp_patch_page) for the swap case. No inference required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources