Skip to main content
Glama

modx_create_media_source

Create a MODX media source to define file storage paths and URLs. Set a name, optional class key, description, and properties such as basePath and baseUrl.

Instructions

Create a media (file) source. class_key defaults to sources.modFileMediaSource. 'properties' is a {name:value} map of source params (e.g. {"basePath":"assets/files/","baseUrl":"assets/files/"}) merged into 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": {
      "name": "<name>"
    },
    "name": "modx_create_media_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
class_keyNo
propertiesNo{paramName: value} map, e.g. basePath/baseUrl.
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.4

TDQS

B3.2/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 does disclose two useful behaviors: class_key defaults to sources.modFileMediaSource, and 'properties' is merged into the source rather than replacing it. It omits permissions, duplicate-name behavior, and what is returned on success.

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?

Three short sentences with the core action front-loaded and the default/merge semantics following. No filler, though the inline JSON example makes it slightly dense.

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 mutation tool with no annotations and no output schema, the description covers the two most confusing parameters but not the required 'name' semantics or failure conditions. It is adequate but leaves gaps an agent would likely hit.

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 only 25%, so the description must compensate. It adds real meaning for class_key (its default) and properties (map shape plus a basePath/baseUrl example), but leaves 'name' and 'description' undefined in both schema and description.

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?

Opens with a specific verb+resource: "Create a media (file) source." That clearly separates it from modx_update_media_source and modx_list_media_sources, though no sibling is named explicitly.

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?

The description never states when to choose this over modx_update_media_source or how it relates to source listing/lookup, and gives no prerequisites such as unique-name requirements or permissions. Usage is only implied by the verb "create".

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