Skip to main content
Glama

wp_media_delete

Delete a media item from WordPress, sending it to trash for recovery. Permanent deletion available with explicit confirmation.

Instructions

Delete a media item. Default sends to trash (recoverable). Pass force=true with confirm="DELETE_PERMANENTLY_" to permanently delete (requires MODE=full). Note: WP's native UI offers no trash recovery for media by default — many sites have ATTACHMENT_DEFAULT_TRASH disabled. Verify your site's behavior before relying on the trash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
forceNo
confirmNo
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 of disclosing side effects. It clearly states that the default operation is a recoverable trash action, while permanent deletion requires force=true and a confirm string, and requires MODE=full. It also transparently warns about the variability of trash behavior in WP across sites, going beyond simple operation descriptions.

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 three sentences long, front-loading the primary action and then addressing optional behavior and caveats. No words are wasted; every sentence contributes useful information, making it appropriately sized and well-structured.

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 the absence of annotations, output schema, and schema descriptions, this description is notably complete. It covers the operation's default behavior, the permanent deletion path with its prerequisites, and a relevant platform-specific caveat. It leaves little to no critical gaps for an agent to misuse the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides no descriptions (0% coverage), so the description's explanations of force and confirm are critical. It specifies the exact format for confirm ('DELETE_PERMANENTLY_<id>') and clarifies that force=true is a prerequisite for permanent deletion, adding meaning well beyond the bare type/default information in the schema.

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 opens with 'Delete a media item', which is a specific verb+resource statement that clearly distinguishes this tool from media get/update/list/upload and from delete tools for other resources. It further clarifies the two modes of deletion (trash vs permanent), leaving no ambiguity about what the tool does.

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?

It explains when to use the default trash behavior vs the force=true permanent deletion, and explicitly states the confirm parameter is required for permanent deletion. It also provides a site-specific caution about trash reliability, which is useful context, though it doesn't explicitly name alternative tools or state 'when not to use'.

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