Skip to main content
Glama

delete_media

Permanently delete a registered media asset by removing storage files, vector embeddings, and all associated metadata. This action cannot be undone.

Instructions

Permanently delete a registered media asset. Removes storage files, vector embeddings, and all associated metadata. This action cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_idYesUUID of the media asset to delete

Implementation Reference

  • Main handler implementation for delete_media tool. Contains the register function that defines the tool with its schema and async handler that calls the API to delete media.
    export function register(server: McpServer, api: ApiClient): void {
      server.tool(
        "delete_media",
        "Permanently delete a registered media asset. Removes storage files, " +
          "vector embeddings, and all associated metadata. This action cannot be undone.",
        {
          media_id: z.string().describe("UUID of the media asset to delete"),
        },
        async ({ media_id }) => {
          try {
            await api.delete(
              `/api/v1/media/${encodeURIComponent(media_id)}`,
            );
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Media ${media_id} deleted successfully.`,
                },
              ],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Error: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true as const,
            };
          }
        },
      );
    }
  • Input schema definition using zod for the delete_media tool, validating that media_id is a required string UUID.
    {
      media_id: z.string().describe("UUID of the media asset to delete"),
    },
  • src/index.ts:19-19 (registration)
    Import statement for the delete_media tool registration function.
    import { register as deleteMedia } from "./tools/delete-media.js";
  • src/index.ts:63-63 (registration)
    Registration call that registers the delete_media tool with the MCP server.
    deleteMedia(server, api);
  • ApiClient.delete method used by the delete_media handler to make HTTP DELETE requests to the API.
    async delete<T = unknown>(path: string): Promise<T> {
      return this.request<T>(new URL(`${this.baseUrl}${path}`), {
        method: "DELETE",
      });
    }
Behavior4/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 behavioral disclosure. It effectively describes the tool's behavior by specifying that it 'Removes storage files, vector embeddings, and all associated metadata' and warns 'This action cannot be undone,' which covers key aspects like destructiveness and irreversibility. However, it lacks details on permissions, rate limits, or error handling.

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 appropriately sized and front-loaded, consisting of two concise sentences that convey critical information without waste. The first sentence states the action and scope, and the second emphasizes the irreversible nature, making every sentence earn its place effectively.

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?

Given the tool's complexity as a destructive operation with no annotations and no output schema, the description is reasonably complete. It covers the action, scope, and irreversibility, but could benefit from mentioning potential side effects or response formats. However, it adequately addresses the core behavioral aspects for an agent to understand the tool's impact.

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?

The schema description coverage is 100%, with the parameter 'media_id' fully documented in the schema as 'UUID of the media asset to delete'. The description does not add any additional meaning or context beyond what the schema provides, so it meets the baseline for high schema coverage without compensating with extra details.

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 clearly states the tool's purpose with a specific verb ('Permanently delete') and resource ('a registered media asset'), distinguishing it from siblings like 'get_media' or 'update_media'. It explicitly indicates the scope of deletion, making the action distinct and unambiguous.

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?

The description implies usage by stating the tool deletes media assets, but it does not provide explicit guidance on when to use this tool versus alternatives like 'update_media' or 'protect_media'. No prerequisites or exclusions are mentioned, leaving the context somewhat open-ended.

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/sidearmDRM/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server