Skip to main content
Glama

modx_delete_media_file

Delete a file from a MODX media source by providing the source ID or name and the file path, so unwanted media assets can be removed accurately.

Instructions

Delete a file inside a media source. source = id/name, path = file path within the source.

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": {
      "source": "<source>",
      "path": "<path>"
    },
    "name": "modx_delete_media_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
sourceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.4

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and mostly does not: it does not say the deletion is permanent/irreversible, what happens if the path does not exist, what permissions are needed, or whether the file goes to a recycle location. Only the implied 'delete = destructive' is conveyed by the verb.

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?

Two short sentences with the action front-loaded and the parameter hints compactly appended. No filler, though the second sentence reads as a schema footnote rather than integrated guidance.

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

Completeness2/5

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

For a destructive, two-required-parameter tool with no annotations and no output schema, the description leaves out irreversibility, error behavior, and permission requirements. An agent knows what it deletes but not the consequences of calling it.

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 0%, so the description must compensate, and it does partially: it defines 'source' as id/name and 'path' as the file path within the source. It does not clarify path formatting (leading slash, relative to source root) or how source resolution behaves when both an id and a name could match.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 file') and scopes it ('inside a media source'), which distinguishes it from the source-level and folder-level siblings. It never names those siblings explicitly, so the differentiation is inferred from the noun rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use guidance and no mention of alternatives such as modx_delete_media_folder or modx_delete_media_source. The agent must infer from the tool name alone that this deletes a single file, not a folder or a whole source.

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