Skip to main content
Glama

wp_update_media

Updates metadata for an existing WordPress media item, such as title, alt text, caption, or description. Only the fields you specify are changed, so existing media details stay intact.

Instructions

Update media item metadata (title, alt text, caption, description, attachment, ...); only the given fields change

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>",
      "id": "<id>"
    },
    "name": "wp_update_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesMedia ID
dateNoDate in the site timezone (ISO8601)
metaNoRegistered meta fields (show_in_rest) as key/value
postNoID of the post the item is attached to (0 = unattached)
siteYesSite id (see list_sites)
slugNoURL slug
titleNoTitle
authorNoAuthor user ID
statusNoStatus (media normally inherits its parent's; 'private' hides it)
captionNoCaption
alt_textNoAlt text for images
date_gmtNoDate in GMT (ISO8601)
templateNoTheme template file for the attachment page
descriptionNoDescription
ping_statusNoWhether pingbacks/trackbacks are open
comment_statusNoWhether comments are open
featured_mediaNoCover image media ID (audio/video)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv3.14.0
    • addedInput schema / properties / author
      Added value: +{
      +  "description": "Author user ID",
      +  "type": "integer"
      +}
    • addedInput schema / properties / comment_status
      Added value: +{
      +  "description": "Whether comments are open",
      +  "enum": [
      +    "open",
      +    "closed"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / date
      Added value: +{
      +  "description": "Date in the site timezone (ISO8601)",
      +  "type": "string"
      +}
    • addedInput schema / properties / date_gmt
      Added value: +{
      +  "description": "Date in GMT (ISO8601)",
      +  "type": "string"
      +}
    • addedInput schema / properties / featured_media
      Added value: +{
      +  "description": "Cover image media ID (audio/video)",
      +  "type": "integer"
      +}
    • changedInput schema / properties / id / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / meta
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Registered meta fields (show_in_rest) as key/value",
      +  "type": "object"
      +}
    • addedInput schema / properties / ping_status
      Added value: +{
      +  "description": "Whether pingbacks/trackbacks are open",
      +  "enum": [
      +    "open",
      +    "closed"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / post
      Added value: +{
      +  "description": "ID of the post the item is attached to (0 = unattached)",
      +  "type": "integer"
      +}
    • addedInput schema / properties / slug
      Added value: +{
      +  "description": "URL slug",
      +  "type": "string"
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "Status (media normally inherits its parent's; 'private' hides it)",
      +  "enum": [
      +    "publish",
      +    "future",
      +    "draft",
      +    "pending",
      +    "private"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / template
      Added value: +{
      +  "description": "Theme template file for the attachment page",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "id"
      -]New value: +[
      +  "site",
      +  "id"
      +]
  3. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does add one genuinely useful behavioral fact — partial update semantics ('only the given fields change') — but says nothing about required capabilities, whether meta fields are validated, or what happens to the underlying file, which is thin for a 17-parameter mutation tool.

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?

A single compact sentence with the operation front-loaded and the patch behavior tacked on where it matters. The trailing ellipsis and vague 'attachment' reference (the actual parameter is 'post') add mild noise.

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?

With 17 parameters, required site/id, nested meta, and no annotations or output schema, the agent needs to know the mutation's scope and safety profile. The schema covers parameter detail fully, but the description leaves the behavioral side largely unaddressed.

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 description coverage is 100%, so every parameter including the nested meta object is documented in the schema, establishing a baseline of 3. The description restates a handful of the field names shown in the schema and adds the patch-semantics note, but no format or constraint detail beyond that.

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?

The description names a specific verb and resource ('Update media item metadata') and enumerates representative fields (title, alt text, caption, description). It does not differentiate this tool from the closely named siblings mcp_update_media or media_update_settings, so an agent cannot route between them from this text alone.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus alternatives such as media_update_settings or the mcp_* variants, and no prerequisites or exclusions are stated. Only the implicit hint that this is a metadata patch tool, not a file replacement, is conveyed.

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