Skip to main content
Glama

modx_find_usages

Find where a MODX element is referenced before renaming or deleting it: searches all code for its name and, for templates, lists assigned resources.

Instructions

Find where an element is used: content matches for its name across all code, plus — if it is a template — the resources assigned to that template. Use before renaming/deleting an element.

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

Input Schema

NameRequiredDescriptionDefault
nameYesElement name (chunk/snippet/template/TV name).
limitNoMax results (default 100).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.4

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full load, and it does disclose the important behavior: two distinct match modes (code-name matches and template-to-resource assignments) and the conditional branch that applies only when the element is a template. It does not state the operation is read-only or say anything about result volume/performance, but the functional disclosure is solid.

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 sentences, no filler, and the core behavior is front-loaded ahead of the workflow hint. Every clause contributes either scope or timing guidance.

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?

For a two-parameter read tool with no output schema and a well-covered input schema, this is nearly enough to call it correctly. The remaining gap is the shape of the results — whether code hits and template assignments come back as separate groups — which the agent must discover by 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 coverage is 100%, so both parameters are already documented and the baseline is 3. The description clarifies that `name` is matched against code content rather than being an exact element ID, which adds a little meaning, but it does not explain how `limit` interacts with the two result categories.

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?

The description gives a specific verb and resource ("Find where an element is used") and defines the search scope: name matches across all code, plus template resource assignments. That is precise enough to separate it from modx_search_code or modx_dependency_graph, though it never names an alternative outright.

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?

It gives an explicit trigger — "Use before renaming/deleting an element" — which tells the agent exactly when this tool belongs in a workflow. It stops short of stating when-not to use it or which sibling to pick for plain code search, so it is clear context without exclusions.

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