Skip to main content
Glama

WordPress: Add image

wp_add_image

Add an image from a URL to the site's media library. Nothing is overwritten: the file is a new library item, invisible to visitors until used, and existing media stays as it was. With set_featured it also becomes that post's featured image, which REPLACES the one visitors currently see — so that case returns a preview and needs confirm: true; the previous image remains in the library and can be set back. Always set alt text.

Input Schema

NameRequiredDescriptionDefault
altYesDescribe the image for screen readers and search engines
urlYes
siteYes
confirmNoNeeded only when set_featured is true, since that changes a live post. Leave false to preview; set true only after the user has agreed.
filenameNo
attach_toNo
set_featuredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / confirm / default
      Added value: +false
    • changedInput schema / properties / confirm / description
      Previous value: -"Needed only when set_featured is true, since that changes a live post. Leave unset to preview."New value: +"Needed only when set_featured is true, since that changes a live post. Leave false to preview; set true only after the user has agreed."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare non-destructiveHint, but the description adds the crucial nuance that set_featured REPLACES the visible featured image (a live-site change requiring confirmation and returning a preview), while the original remains recoverable. This goes well beyond the annotations.

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-loads the primary action and consequences, then handles the featured-image branch; dense but each clause carries information. Slightly long but justified by the branching behavior.

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

Completeness4/5

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

For a 7-parameter mutation tool with no output schema, it covers the risky paths (overwrite semantics, featured replacement, confirmation flow, alt-text requirement). Missing coverage of filename/attach_to semantics keeps it from a 5.

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 only 29%, but the description supplies the semantics of the two most consequential parameters: set_featured (makes the image the post's featured image) and confirm (needed only with set_featured, otherwise previews). It does not cover filename or attach_to, leaving a modest gap.

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 ('Add an image from a URL to the site's media library') and disambiguates from sibling write tools like wp_write_post and wp_replace_in_post by describing the media-library placement and optional featured-image side effect.

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?

Explicit conditions: use confirm: true only when set_featured is true and after user agreement; the no-overwrite case is stated as the default path. The 'Always set alt text' rule functions as a usage requirement.

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.