Tools Catalog / Media generation / wp_delete_media_item

wp_delete_media_item tool reference for media workflows

Write
Group ManagementCapability upload_files

deletes a media item by ID. It can permanently delete it with `force=true`.

Description

deletes a media item by ID. It can permanently delete it with `force=true`.

What it is for

  • Cleaning unused files.
  • Reverting incorrect generations or uploads.

Example use case

removing an incorrect upload.

Sample prompt

Delete media item ID 981 because it was uploaded by mistake.

Sample response

{
  "tool": "wp_delete_media_item",
  "status": "ok",
  "updated": true
}

What does wp_delete_media_item do?

deletes a media item by ID. It can permanently delete it with `force=true`.

Does wp_delete_media_item modify the media library?

Yes. It can create, update, or delete media assets depending on the arguments.

Which capability is commonly required?

It usually runs under controls compatible with upload_files and the active MCP profile.

How should wp_delete_media_item be used safely?

Confirm target assets, review uploads before publication, and keep rollback-friendly workflows where possible.

What dependency should be confirmed first?

WordPress media library