Skip to main content
Glama

Delete Card Builder media file

card_builder_delete_media
DestructiveIdempotent

Permanently delete a file from the Card Builder media directory by relative path. Verify no card references it first, since media links are not updated.

Instructions

Permanently delete one file from the Card Builder media directory.

Calls card_builder/media/delete with path relative to www/card_builder/. Any card whose mediaReference points at this file (e.g. via block-image or block-weather-background) will fail to load it afterwards — this tool does not check for or update such references.

Use when: removing an uploaded image/SVG that no card uses anymore. Returns: {"status": "deleted", "path": ..., "result": ...} on success. Errors: on failure, returns {"status": "error", "path": ..., "error": <exception text>} instead of raising.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath of the file to delete, relative to www/card_builder/ (see card_builder_list_media).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / path / description
      Added value: +"Path of the file to delete, relative to www/card_builder/ (see card_builder_list_media)."
  2. Addedv0.18.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes further: it explains that references are NOT checked or updated and that referencing cards will break, and it discloses the exact success/error response shapes and that errors are returned rather than raised. This is meaningful behavioral context beyond the annotations.

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?

Front-loaded with the core action, then mechanics, usage condition, and return/error contract in a clean sequence. The explicit return-value description is somewhat redundant given an output schema exists, but nothing is padded or out of order.

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 single-parameter destructive delete, the description covers purpose, the underlying call, the reference-breakage caveat, when to use it, and both success and failure responses. Nothing an agent needs to invoke it safely is 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 coverage is 100% and the single path parameter is already documented as relative to www/card_builder/. The description reinforces the same path semantics and adds the consequence of deleting a referenced file, but adds no new syntax or format detail beyond the schema. 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 (permanently delete) and resource (one file from the Card Builder media directory), with a precise scope that separates it from card_builder_delete_card and card_builder_list_media. An agent can identify exactly what this tool operates on 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?

The 'Use when: removing an uploaded image/SVG that no card uses anymore' line gives clear context and an implicit precondition (nothing may reference the file). It does not name alternative sibling tools, so it falls short of full when/when-not/alternatives coverage.

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

Deploy Server

Other Tools