Skip to main content
Glama

WordPress: Upload media from url

wordpress_upload_media_from_url
Destructive

Add media to a WordPress library directly from a public URL. Downloads the file with SSRF protection, detects the MIME type, and uploads it, optionally setting metadata and attaching it to a post.

Instructions

[UNIFIED] Upload media from a public URL to the WordPress media library (sideload). Downloads the file with SSRF protection, sniffs MIME, and uploads via raw-binary POST.

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>",
      "url": "<url>"
    },
    "name": "wordpress_upload_media_from_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
siteYes
titleNo
captionNo
alt_textNo
filenameNo
convert_toNo
set_featuredNo
skip_optimizeNo
attach_to_postNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv3.13.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / attach_to_post
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / convert_to
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / filename
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / set_featured
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": false
      +}
    • addedInput schema / properties / skip_optimize
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": false
      +}
  2. First observedv3.4.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare a non-readonly, non-idempotent, destructive write, and the description adds genuinely useful process context: SSRF protection on the download, MIME sniffing, and raw-binary POST upload. However, it does not explain the destructive surface the annotation warns about (e.g. overwriting an existing file by filename, side effects of set_featured or attach_to_post), leaving the agent without the details most relevant to a destructive operation.

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?

One dense sentence with the resource and source front-loaded and zero filler. The '[UNIFIED]' prefix is tag noise rather than information, but the rest earns its place.

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

Completeness3/5

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

For a destructive, non-idempotent write with 10 undocumented parameters and no output schema, the description should say what is returned (media ID/URL) and what happens if a same-named file exists. The pipeline disclosure is helpful, but coverage of parameters and return behavior is too thin for a tool of this complexity.

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 10 parameters, so the description carries the full burden and largely drops it. Only 'url' (public/reachable) and 'site' are implicitly touched; title, caption, alt_text, filename, convert_to, set_featured, skip_optimize, and attach_to_post get no meaning at all—especially costly for skip_optimize and convert_to, whose effects are not guessable from their names.

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 ('Upload media'), resource ('WordPress media library'), and source ('from a public URL'), which implicitly separates it from the base64 and chunked siblings. It does not name an alternative explicitly, so it falls short of a 5, but an agent can identify the tool's job immediately.

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

Usage Guidelines3/5

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

'From a public URL' implies the precondition that the file must be reachable over the internet, but there is no explicit when-to-use versus wordpress_upload_media_from_base64, the chunked upload family, or wordpress_generate_and_upload_image. Usage has to be inferred from the source type in the name.

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