Skip to main content
Glama

Upload media

wp_media_upload

Upload a local file or sideload a remote URL into a WordPress media library, with optional title, alt text, and filename.

Instructions

Upload a local file to the media library. Provide path, or url to sideload a remote file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoRemote URL to download then upload
pathNoLocal absolute path
titleNo
alt_textNo
filenameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations supply only openWorldHint=true, so the description carries most of the behavioral burden. It discloses that url means sideloading (download-then-upload), but says nothing about overwrite/duplicate-filename behavior, permission requirements, size limits, or success/failure semantics for a mutating upload.

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?

Two tight sentences, front-loaded with the core action and followed by the input-mode clarification. No filler, though it could be marginally more informative without growing much.

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?

No output schema exists, so the description should convey what happens on success/failure, but it doesn't. Combined with sparse annotations and partial parameter documentation, it is adequate for a basic upload but leaves real gaps around results and edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is low at 40%, so the description should compensate. It does explain the two primary parameters (path and url) and their mutual exclusivity, but title, alt_text, and filename remain undocumented in both schema and description.

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 and resource ('Upload a local file to the media library') and clarifies the two intake modes (local path vs remote url). An agent can easily distinguish this from wp_media_list, but the description never names or contrasts a sibling explicitly.

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?

The sentence 'Provide path, or url to sideload a remote file' gives concrete guidance on the two mutually-exclusive input modes, which is implied usage context. However, it offers no when-to-use vs. alternatives, no prerequisites, and no exclusions.

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