Skip to main content
Glama

delete_media

DestructiveIdempotent

Deletes a WordPress media file by ID. Use force to permanently remove it, since WordPress does not support trashing media by default.

Instructions

Delete WordPress media file. WordPress does not support moving media to the trash by default, so force: true is usually required

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": {
      "media_id": "<media_id>"
    },
    "name": "delete_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoPermanently delete (bypass trash). Usually required for media, since WordPress does not support trashing media by default
media_idYesMedia ID to delete

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds genuinely useful non-obvious context: WordPress does not trash media by default, so deletion is effectively permanent unless force is set. It does not mention what happens to posts referencing the media, which keeps it from a 5.

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 short sentences with the key constraint front-loaded after the purpose statement. The trash limitation is stated twice in near-identical wording, a small redundancy that keeps it from a 5.

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?

Adequate for a simple two-parameter destructive tool whose annotations and schema are fully populated and which returns no structured output. It still leaves open whether deletion fails when the media is attached to content, which matters for a permanent-delete operation.

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 100%, so both parameters are already documented, and the description's force explanation largely restates the schema's own force description rather than adding new semantics. Baseline 3 applies when the schema carries the parameter burden.

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 ("Delete WordPress media file"), which cleanly separates it from the delete_post / delete_category / delete_tag siblings by resource. It stops short of naming an explicit alternative, so 4 rather than 5.

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?

Implied usage: an agent can infer this is the path for removing media, and the force guidance tells it how to actually complete the deletion. However, there is no explicit when-to-use vs. update_media (e.g., clearing a featured image) or any stated precondition like ownership or capability requirements.

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