Skip to main content
Glama

modx_delete_element

Delete MODX elements safely by previewing with dry_run first to see what would be removed and where it is still referenced before confirming deletion.

Instructions

Delete a MODX element. Run with dry_run:true FIRST — it returns what would be deleted plus where the element is still referenced (for resources: child-resource count), without deleting. Review that before the real delete.

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": {
      "type": "<type>"
    },
    "name": "modx_delete_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
nameNo
typeYes
dry_runNoPreview what would be deleted + its usages, without deleting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.4

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that dry_run returns the would-be-deleted element plus its remaining references and, for resources, a child-resource count. It omits critical behavior: whether deletion is permanent or goes to the recycle bin (siblings modx_undelete_resource and modx_empty_recycle_bin imply recoverability), whether deletion is blocked when references exist, and what permissions are required.

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?

Two tight sentences with the destructive action stated first and the safety workflow immediately after. No filler, and the most important instruction (dry_run first) is front-loaded.

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

Completeness3/5

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

For a destructive, four-parameter tool with no annotations and no output schema, the description covers the preview workflow well but leaves gaps on target identification (id/name), permanence of deletion, and behavior when references exist. An agent could still call it, but not with full confidence about consequences.

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 only 25%, and the description only elaborates on dry_run, which the schema already documents. It adds the useful detail that the preview includes usages and child-resource counts, but says nothing about how the target is identified — id vs name — despite only type being required, leaving a real ambiguity.

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 MODX element"), which distinguishes it from the many non-delete siblings. However, it never clarifies that "element" spans seven distinct types (chunk, snippet, template, resource, tv, category, plugin), so an agent must open the schema to learn the scope.

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?

Gives strong procedural guidance — run with dry_run:true first and review the preview before the real delete — which is genuinely useful. It offers no guidance on when to prefer this over related tools like modx_find_usages or modx_dependency_graph for reference checking, nor any prerequisites.

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