Skip to main content
Glama

royal-mcp__wp_upload_media_from_url

Destructive

Download a file from a public HTTPS URL and add it to the WordPress media library. Accepts images and any document type the site allows in its media library (for example PDF). Use this when you have a file URL (Unsplash, Pexels, client asset, an official PDF, etc) that needs to become a library attachment — for example before setting an image as a featured image. Returns the new attachment ID and its MIME type. To convert, resize or compress an image on the way in (for example a JPEG under 400 KB), pass convert_to, max_width / max_height and max_kb. Pass if_exists: reuse to get back the existing attachment when this URL was already uploaded with the same options, so a retry never makes a duplicate. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.

Input Schema

NameRequiredDescriptionDefault
urlYesPublic HTTPS URL of the file to download
titleNo
max_kbNoImages only. Lower the quality step by step until the file is at most this many kilobytes. Works best with convert_to jpeg or webp.
captionNo
qualityNoImages only. Starting quality for JPEG or WebP (default 82).
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
alt_textNoAlt text for accessibility and SEO (images only)
filenameNoOptional filename (with extension). Derived from URL if omitted.
if_existsNoreuse: when the same file (for a URL upload, the same URL) was already uploaded with the same image options, return that attachment instead of adding a duplicate. Default create.
max_widthNoImages only. Scale down to at most this many pixels wide, keeping proportions (never scales up).
convert_toNoImages only. Save the image in this format; a PNG from an image generator usually becomes a much smaller JPEG.
max_heightNoImages only. Scale down to at most this many pixels high, keeping proportions (never scales up).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: the write is gated by human approval in Royally and 'nothing on the site changes until then', plus what the call returns (ID + MIME type). It also clarifies that retries with if_exists: reuse avoid duplicates, tempering the raw idempotentHint=false. It omits failure modes (unreachable URL, oversized file, permission errors), which keeps it below 5.

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 core action in the first sentence, then scenarios, returns, options, and idempotency. Dense but each sentence carries a distinct fact; the trailing site/approval sentences are slightly tacked on but still informative.

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?

For a 12-parameter write tool with no output schema, the description covers purpose, trigger, return values, the human-approval gate, and the key duplicate-avoidance switch — enough for an agent to call it correctly and interpret the pause.

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 already 83%, so the baseline is 3; the description earns more by grouping the image-processing parameters toward an outcome ('convert, resize or compress... for example a JPEG under 400 KB') and explaining the if_exists: reuse semantics in workflow terms. It doesn't address title/caption/filename/alt_text beyond what the schema already says.

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 specific verb+resource+mechanism: download a file from a public HTTPS URL and add it to the WordPress media library, returning attachment ID and MIME type. It also scopes accepted content ('images and any document type the site allows') and contrasts against file-based upload by emphasizing the URL input, so it is distinguishable from the sibling wp_upload_media.

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

Usage Guidelines4/5

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

Explicit trigger: 'Use this when you have a file URL (Unsplash, Pexels, client asset...)' and a concrete downstream scenario ('before setting an image as a featured image'). It does not name the alternative tool (wp_upload_media) for local files, so the exclusion is implied rather than stated.

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