Skip to main content
Glama

Delete uploaded media file

delete_media_file
Destructive

Permanently delete one uploaded file belonging to the current account, using its URL from list_uploaded_files or the gallery. Refuses files referenced by any post, including drafts, scheduled posts and published posts; never detaches media and has no force override. Deletes the storage object and its upload/library records.

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": {
      "url": "<url>"
    },
    "name": "delete_media_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the file, exactly as returned by list_uploaded_files or the gallery.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / url / description
      Added value: +"URL of the file, exactly as returned by list_uploaded_files or the gallery."
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare destructive=true; the description adds real behavioral detail: the refusal rule for files referenced by drafts, scheduled, and published posts, the absence of a force override, and the fact that both the storage object and the library records are removed. These are non-obvious consequences an agent cannot infer from the annotations or schema.

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?

Three dense sentences, front-loaded with the verb and permanence, then preconditions, then side effects. Nothing is padded, and the refusals are stated before the cascade description where they belong.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive one-parameter tool with no output schema, the description covers permanence, preconditions, and cascade effects, which is most of what an agent needs. It stops short of describing the response or what an error looks like when the file is referenced, so the agent knows the call may fail but not the form that failure takes.

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% and the single parameter already documents that the URL must match what list_uploaded_files returns, so the description's 'using its URL from list_uploaded_files or the gallery' largely restates it. Only the implicit 'current account' restriction adds light meaning beyond the schema; baseline 3 applies.

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 and resource ('Permanently delete one uploaded file') plus the ownership scope ('belonging to the current account'), which separates it from post-level deletion siblings like delete_post and delete_broadcast. An agent can tell what it destroys without opening the schema.

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?

Tells the agent where the identifier comes from ('its URL from list_uploaded_files or the gallery') and states the precondition that referenced files are refused. It implies, via 'never detaches media', that detaching is a different operation, but it does not name the sibling to use for that case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources