Skip to main content
Glama

media_delete

Destructive

Deletes a file from the media library permanently, to clean up after yourself: an upload that turned out wrong, or a file the user no longer wants stored (it frees the storage it counted against). The file must be unused - one any Riddle still shows is refused with a message naming those Riddles, since deleting it would leave a broken image behind in a live Riddle; remove it there first (riddle_builder_update, then riddle_publish so the change is live) and delete afterwards. Unused is a property of the file across the whole ACCOUNT, not of one Riddle: several Riddles can use it and any one of them keeps it alive, and a file the Creator lists as in use cannot be forced out from here either. Not reversible, no undo, and the id is not reused, so anything still pointing at the file stops resolving - ask the user before calling this. Returns {deleted: true, mediaId, name, type, size}. Without full access only files in the "AI Uploads" folder (media_upload_link's destination): riddle://reference/concepts/access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mediaIdYesThe media library id of the file to delete - the "mediaId" the upload response returned, or the id shown for the file in the Creator's media library.
projectNoProject ID; NULL or omitted: your personal project (project API key: its project). A mediaId only resolves in its project - build in the same one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "default": null,
      +  "description": "Project ID; NULL or omitted: your personal project (project API key: its project). A mediaId only resolves in its project - build in the same one.",
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the destructive/idempotent annotations by disclosing irreversibility, no undo, non-reuse of the id, broken references afterward, the refusal behavior naming offending Riddles, the account-wide 'unused' semantics, and access-scope restrictions. This is exactly the context an agent needs before a destructive call.

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?

It is a dense single paragraph, but front-loaded with the core action and organized by concern (use case, precondition, consequences, permissions). Slightly long with some emphatic redundancy ('Not reversible, no undo'), but every clause carries actionable content.

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?

For a destructive tool with no output schema, the description covers preconditions, failure modes, permission limits, and the return shape ({deleted, mediaId, name, type, size}), leaving nothing an agent needs missing.

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 both mediaId and project are already fully documented in the schema. The description reinforces the project-scoping constraint but adds no syntax or format detail beyond what the schema provides, so the baseline 3 is appropriate.

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 ('Deletes a file from the media library permanently') and immediately distinguishes scope by naming the intended cleanup use case. An agent can tell it apart from media_upload_link and the riddle tools 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 Guidelines5/5

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

Explicitly states when to use it (cleaning up bad uploads or unwanted files) and the prerequisite that the file must be unused. It names the blocking alternative workflow (remove from the Riddle via riddle_builder_update then riddle_publish first) and the permission caveat for limited access, leaving little to inference.

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