Skip to main content
Glama

Module Event Subscriber Create

module_event_subscriber_create

Create a Drupal event subscriber service class with a getSubscribedEvents method, defining the machine name, class, and events to respond to during module development.

Instructions

Create an event subscriber service with getSubscribedEvents method.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
eventsNo
class_nameNo
machine_nameYes
subscriber_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.5/5.0
Behavior1/5

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

No annotations are provided, so the description carries the full burden. It does not state whether the service is registered automatically (e.g., via .services.yml), whether files are created on disk, whether the operation is reversible, or what permissions are required. For a create tool, this is a severe gap.

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?

The description is a single, front-loaded sentence with no wasted words. It is appropriately sized but lacks the additional context needed for this complex tool.

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

Completeness1/5

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

Given the tool has no annotations, 0% schema description coverage, 5 undocumented parameters, and an output schema that is not described, the description is completely inadequate. An agent cannot determine required permissions, side effects, or parameter usage from this definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no information about any of the 5 parameters. Parameters like machine_name, subscriber_name, path, events, and class_name are left completely undocumented in both schema and description.

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 (Create), resource (event subscriber service), and names the distinguishing method (getSubscribedEvents). This sets it apart from sibling tools like module_service_create and module_plugin_create.

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 indication of when to use this versus module_service_create, module_controller_create, or other module scaffolding tools. No prerequisites (e.g., module must exist) or alternative suggestions are provided.

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