Skip to main content
Glama

wp_upload_media

Uploads a local image file to the site's media library with optional alt text. Supports JPG, PNG, GIF, WebP up to 10 MB; defaults to dry-run, pass allow_prod to upload.

Instructions

Upload a LOCAL image file into a site's media library, with optional alt text.

file_path is a path on the machine running this server (not a URL). Images only: .png/.jpg/.jpeg/.gif/.webp, max 10 MB; .svg is refused (script vector). The filename is sanitized and the directory dropped. DEFAULTS TO dry_run=true (returns a preview: filename/mime/bytes; uploads nothing). Pass dry_run=false to upload - the returned url is what you feed to an {kind:'image'} block in wp_create_content or wp_edit_page. Requires the REST transport. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altNo
dry_runNo
installYes
file_pathYes
allow_prodNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.4.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses the default dry_run=true behavior, the filename sanitization and directory drop, file type restrictions (including the refusal of .svg for security), the size limit, the REST transport requirement, and the allow_prod guard. No contradictions.

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 front-loaded with the main purpose, then uses a compact bullet-like structure for constraints and usage. Every sentence adds value—no filler. The length is justified by the safety and workflow nuances.

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?

Given 5 parameters, no annotations, and no output schema, the description provides all essential context: what the tool does, how to invoke it safely, what the dry_run preview returns, and how to use the resulting URL. It covers file validation, prod protection, and integration points. Only a minor install parameter omission, but that is likely self-evident from the WordPress context.

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 0%, so the description must compensate. It explains file_path (local path, not URL), alt, dry_run (with default), and allow_prod. It does not explicitly explain the install parameter, which is required and likely refers to the WordPress site installation. This is a minor gap given the otherwise rich coverage.

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 (Upload), a precise resource (local image file into a site's media library), and adds the optional alt text. It also names the downstream consumers (wp_create_content / wp_edit_page), distinguishing it from the sibling WordPress tools.

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?

Explicitly states when to use it: to upload a local image, with clear constraints (file types, size, dry_run default). It explains the dry_run vs. real upload workflow and the allow_prod requirement, and implies the alternative (using a URL instead of a local path) is not for this tool. The integration with content creation is explicitly described.

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

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/ad02/wp-ops-mcp'

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