Skip to main content
Glama

Delete a run's files

delete_run_media
DestructiveIdempotent

Delete a finished run's media files in one step to free storage before the 7-day automatic erasure; the charge remains non-refundable.

Instructions

Delete a finished run's files at once; storage erases them after 7 days. The charge stays; nothing is refunded. Refused with run_not_finished, run_media_in_use (another unfinished run uses them) or deletion_held (ask support). An analyze_reference run loses its analysis too: a new one is paid. Free.

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": {
      "run_id": "<run_id>"
    },
    "name": "delete_run_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.45.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: storage erasure lag of 7 days, the charge is not refunded, the exact error codes and their meanings, and the cascade that an analyze_reference run loses its analysis and a new one is billable. That is exactly the consequence information an agent needs before invoking a destructive, non-refundable operation.

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?

Densely front-loaded: the action and its destructive consequence lead, refusals follow, side effects last. A few fragments ('Free.', 'The charge stays; nothing is refunded.') are terse to the point of clipped, but no sentence is wasted.

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 one-parameter destructive tool with no output schema, the description covers irreversibility, retention timing, cost outcome, failure modes, and the analyze_reference cascade. An agent has everything needed to decide and to interpret the refusal codes.

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 0% for the single run_id parameter, and the description only indirectly constrains it by saying the run must be finished. It does not restate the run_ prefix format or point to get_run/list tools for obtaining a valid id, so it adds some but not full meaning beyond 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?

States a specific verb and resource ('Delete a finished run's files') plus the batching scope ('at once') and the precondition that the run must be finished. That resource framing distinguishes it from the asset/upload deletion siblings without needing to name them.

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?

Gives the operative precondition (finished run) and enumerates the conditions under which the call is refused (run_not_finished, run_media_in_use, deletion_held), including a redirect to support for the held case. It does not explicitly contrast with delete_asset or delete_upload, so the sibling routing is only implicit.

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