Skip to main content
Glama

wp_media_upload

Upload files to the WordPress media library using a URL or base64 data, with optional metadata for title, alt text, caption, and post attachment.

Instructions

Upload a file to the WordPress media library. Provide EITHER url (the server will fetch the URL and forward the bytes) OR data (a base64-encoded string) with filename and mime_type. Optional metadata: title, alt_text, caption, description, post (attach to a post). Max 25 MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
dataNo
postNo
titleNo
captionNo
alt_textNo
filenameNo
mime_typeNo
descriptionNo
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It reveals that `url` causes the server to fetch and forward bytes, that `data` must be base64-encoded, and that there is a 25 MB cap. But it omits return values, authentication needs, and potential side effects such as creating a new media item.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: the first states the tool's purpose clearly, and the second packs in input modes, required companions, optional metadata, and size limit. Every clause earns its place; no wasted words.

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 9-parameter upload tool with no output schema, the description thoroughly covers inputs and constraints but fails to explain the return value or error behavior. Since no output schema exists, the description should have clarified what the agent can expect after a successful upload.

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 description coverage is 0%, so the description must compensate. It does so by naming and explaining all nine parameters, including the exclusive-or relationship between `url` and `data`, the meaning of `filename`/`mime_type`, and the purpose of `post`. It does not detail valid value formats, but it is strong compensation.

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?

The description begins with a specific verb+resource: 'Upload a file to the WordPress media library.' This uniquely identifies the tool's action and differentiates it from sibling tools like wp_media_get, wp_media_update, and wp_media_delete.

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?

The description gives explicit input guidance: provide EITHER `url` OR `data`, with `filename` and `mime_type` also required for the data path. It also lists optional metadata and the 25 MB limit. However, it does not explicitly mention alternatives among sibling tools, though the upload action is clearly distinct.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iamsamuelfraga/mcp-wordpress'

If you have feedback or need assistance with the MCP directory API, please join our Discord server